Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
2
Task/String-length/Emacs-Lisp/string-length-1.l
Normal file
2
Task/String-length/Emacs-Lisp/string-length-1.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(length "hello")
|
||||
;; => 5
|
||||
2
Task/String-length/Emacs-Lisp/string-length-2.l
Normal file
2
Task/String-length/Emacs-Lisp/string-length-2.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(string-bytes "\u1D518\u1D52B\u1D526")
|
||||
;; => 12
|
||||
7
Task/String-length/Emacs-Lisp/string-length-3.l
Normal file
7
Task/String-length/Emacs-Lisp/string-length-3.l
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(let ((str (apply 'string
|
||||
(mapcar (lambda (c) (decode-char 'ucs c))
|
||||
'(#x1112 #x1161 #x11ab #x1100 #x1173 #x11af)))))
|
||||
(list (length str)
|
||||
(string-bytes str)
|
||||
(string-width str)))
|
||||
;; => (6 18 4) ;; in emacs 23 up
|
||||
Loading…
Add table
Add a link
Reference in a new issue