
Swift and Unicode API Design with Rob Napier
Software Unscripted
00:00
Is Character a Fixed Length Thing?
A character is an extended graphing cluster, which basically means it's like one or more code points that go together. A family emoji can be 25 bytes long. And if you want to index based on that, no problem, but I'm going to have to scan through your string one byte at a time to find, you know, the eighth one of those because they're variable length. There's no possible way to do it in O of one. But with extended graphing clusters and particularly emoji, it's the most common issue.
Transcript
Play full episode