String length: Difference between revisions
Content added Content deleted
(add Crystal example) |
|||
Line 1,090: | Line 1,090: | ||
Length of characters in bytes: 10 |
Length of characters in bytes: 10 |
||
</pre> |
</pre> |
||
=={{header|Crystal}}== |
|||
UTF8 is the default encoding in Crystal. |
|||
===Byte Length=== |
|||
<syntaxhighlight lang="crystal">"J̲o̲s̲é̲".bytesize</syntaxhighlight> |
|||
===Character Length=== |
|||
<syntaxhighlight lang="crystal">"J̲o̲s̲é̲".chars.length</syntaxhighlight> |
|||
=={{header|D}}== |
=={{header|D}}== |