Jump to content

String length: Difference between revisions

add Crystal example
(add Crystal example)
Line 1,090:
Length of characters in bytes: 10
</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}}==
1

edit

Cookies help us deliver our services. By using our services, you agree to our use of cookies.