String length: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 1,802: | Line 1,802: | ||
put bytearray(utf8Str).length |
put bytearray(utf8Str).length |
||
-- 18</lang> |
-- 18</lang> |
||
=={{header|LiveCode}}== |
|||
===Char Length=== |
|||
<lang LiveCode >put the length of "Hello World" -- ASCII method, older Xtalk languages like HyperCard did not natively support Unicode </lang> |
|||
or |
|||
<lang LiveCode >put the number of characters in "Hello World" -- 'chars' short for characters is also valid</lang> |
|||
or |
|||
<lang LiveCode >put length("Hello World")</lang> |
|||
or |
|||
<lang LiveCode >put the number of codeunits of "Hello World" -- count of unicode characters </lang> |
|||
===Byte Length=== |
|||
<lang LiveCode>put the number of bytes in "Hello World" -- use byte keyword in LiveCode for multi-byte Unicode</lang> |
|||
=={{header|Logo}}== |
=={{header|Logo}}== |