News for hackers. Stuff that matters.
Re:String length functions for single emoji characters evalu... by saagarjha on Friday March 26, 2021 @05:50PM (#26597387)
Strings were done well, because they are just BudirectionalCollection and not RandomAccessCollection on graphemes, which is usually what you would want (especially as an app developer writing user-facing code). The other views are collections in their own right. By conforming to Collection a string can do things like be sliced and prefixed and searched over “for free”, which are extremely common operations to define generically.

There are no comments on this comment yet.