String length: Difference between revisions
m
→{{header|Kotlin}}: made the kotlin example not use java
Jazzedpineda (talk | contribs) (Add Plain English) |
m (→{{header|Kotlin}}: made the kotlin example not use java) |
||
Line 1,851:
As each UTF-16 character occupies 2 bytes, it follows that the number of bytes occupied by the string will be twice the length:
<syntaxhighlight lang="
fun main(
val s = "José"
println("The char length is ${s.length}")
println("The byte length is ${
}</syntaxhighlight>
|