String Byte Length: Difference between revisions
Content deleted Content added
Haskell: Provided Unicode example |
example |
||
Line 2: | Line 2: | ||
{{task}} |
{{task}} |
||
In this task, the goal is to find the <em>byte</em> length of a string. This means encodings like [[UTF-8]] may need to be handled specially, as there is not necessarily a one-to-one relationship between bytes and characters, and some languages recognize this. |
In this task, the goal is to find the <em>byte</em> length of a string. This means encodings like [[UTF-8]] may need to be handled specially, as there is not necessarily a one-to-one relationship between bytes and characters, and some languages recognize this. For example, the character length of "møøse" is 5 but the byte length is 7 in UTF-8 and 10 in UTF-16. |
||
For character length, see [[String Character Length]]. |
For character length, see [[String Character Length]]. |