Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
(defn check-all-chars-same [s]
|
||||
(println (format "String (%s) of len: %d" s (count s)))
|
||||
(let [num-same (-> (take-while #(= (first s) %) s)
|
||||
count)]
|
||||
(if (= num-same (count s))
|
||||
(println "...all characters the same")
|
||||
(println (format "...character %d differs - it is 0x%x"
|
||||
num-same
|
||||
(byte (nth s num-same)))))))
|
||||
|
||||
(map check-all-chars-same
|
||||
[""
|
||||
" "
|
||||
"2"
|
||||
"333"
|
||||
".55"
|
||||
"tttTTT"
|
||||
"4444 444k"])
|
||||
Loading…
Add table
Add a link
Reference in a new issue