You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# [Get the ππππ length of a string](https://www.codewars.com/kata/get-the-length-of-a-string"https://www.codewars.com/kata/599c4b69eb8e49effa000079")
2
+
3
+
In languages that use [UTF-16 encoding](https://en.wikipedia.org/wiki/UTF-16) for strings (JavaScript, JVM languages like Java, .NET
4
+
languages like C#...), if the code point of a character is larger than `0xFFFF`, it will be treated as two code units.
5
+
6
+
For example:
7
+
8
+
The code point of the emoji `π` (`U+1F649`, *Hear-No-Evil Monkey*) is `0x1F649`.
9
+
10
+
```java
11
+
"π".length(); // 2
12
+
```
13
+
14
+
Write a function that returns the *real* length of a string.
0 commit comments