diff options
author | Magnar Sveen <magnars@gmail.com> | 2013-08-16 23:26:25 +0200 |
---|---|---|
committer | Magnar Sveen <magnars@gmail.com> | 2013-08-16 23:26:25 +0200 |
commit | 51dd56929056e52ac7b5646afce258a98e998869 (patch) | |
tree | 5bd17f1736898c4b275b4382c7a1fbf3ed069310 /dev | |
parent | 8140902b14f347638361927c3aade6d28d180b0b (diff) |
Better support for international characters
Thanks to tailbalance of reddit
http://www.reddit.com/r/emacs/comments/1khq86/magnarssel_github_string_manipulation/
Diffstat (limited to 'dev')
-rw-r--r-- | dev/examples.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dev/examples.el b/dev/examples.el index 5213867..d47e6d3 100644 --- a/dev/examples.el +++ b/dev/examples.el @@ -220,7 +220,8 @@ (s-capitalized? "I am capitalized") => t (s-capitalized? "I Am Titleized") => nil (s-capitalized? "lower") => nil - (s-capitalized? "UPPER") => nil) + (s-capitalized? "UPPER") => nil + (s-capitalized? "Привет") => t) (defexamples s-numeric? (s-numeric? "123") => t @@ -290,15 +291,15 @@ => "help nic! I'm on fire" ;; Replacing case has no effect on s-format - (let ((case-replace t)) + (let ((case-replace t)) (s-format "help ${NAME}!" 'aget '(("NAME" . "Nick")))) => "help Nick!" - (let ((case-replace nil)) + (let ((case-replace nil)) (s-format "help ${NAME}!" 'aget '(("NAME" . "Nick")))) => "help Nick!" - (let ((case-replace nil)) + (let ((case-replace nil)) (s-format "help ${name}!" 'aget '(("name" . "Nick")))) => "help Nick!" @@ -337,7 +338,9 @@ (s-split-words "under_score") => '("under" "score") (s-split-words "some-dashed-words") => '("some" "dashed" "words") (s-split-words "evenCamelCase") => '("even" "Camel" "Case") - (s-split-words "!map (fn list)") => '("map" "fn" "list")) + (s-split-words "!map (fn list)") => '("map" "fn" "list") + (s-split-words "Привет, мир") => '("Привет" "мир") + (s-split-words "e é è e") => '("e" "é" "è" "e")) (defexamples s-lower-camel-case (s-lower-camel-case "some words") => "someWords" |