Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
8
Task/String-length/Clojure/string-length-3.clj
Normal file
8
Task/String-length/Clojure/string-length-3.clj
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(def grapheme-length
|
||||
#(->> (doto (java.text.BreakIterator/getCharacterInstance)
|
||||
(.setText %))
|
||||
(partial (memfn next))
|
||||
repeatedly
|
||||
(take-while (partial not= java.text.BreakIterator/DONE))
|
||||
count))
|
||||
(map grapheme-length ["møøse" "𝔘𝔫𝔦𝔠𝔬𝔡𝔢" "J\u0332o\u0332s\u0332e\u0301\u0332"]) ; (5 7 4)
|
||||
Loading…
Add table
Add a link
Reference in a new issue