String length: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
(Add Avail entry) |
||
Line 240: | Line 240: | ||
StringLen, Length, String |
StringLen, Length, String |
||
Msgbox % Length</lang> |
Msgbox % Length</lang> |
||
=={{header|Avail}}== |
|||
===Character Length=== |
|||
Avail represents strings as a tuple of characters, with each character representing a single code point. |
|||
<lang Avail>|"mΓΈΓΈse"|</lang> |
|||
===Byte Length=== |
|||
A UTF-8 byte length can be acquired with the standard library's UTF-8 encoder. |
|||
<lang Avail>nonBMPString ::= "ππ«π¦π π¬π‘π’"; |
|||
encoder ::= a UTF8 encoder; |
|||
bytes ::= encoder process nonBMPString; |
|||
|bytes| |
|||
// or, as a one-liner |
|||
|a UTF8 encoder process "ππ«π¦π π¬π‘π’"|</lang> |
|||
=={{header|AWK}}== |
=={{header|AWK}}== |