String length: Difference between revisions

m
Emacs Lisp: Add comments
(Added solution for Action!)
m (Emacs Lisp: Add comments)
Line 1,260:
===Character Length===
<lang lisp>(length "hello")
;; => 5</lang>
===Byte Length===
<lang lisp>(string-bytes "\u1D518\u1D52B\u1D526")
;; => 12</lang>
 
<code>string-bytes</code> is the length of Emacs' internal representation. In Emacs 23 up this is utf-8. In earlier versions it was "emacs-mule".
Line 1,276:
(string-bytes str)
(string-width str)))
;; => (6 18 4) ;; in emacs 23 up</lang>
 
=={{header|Erlang}}==
Anonymous user