▲ | craftkiller 6 days ago | |||||||
> Notably Rust did the correct thing In addition to separate string types, they have separate iterator types that let you explicitly get the value you want. So:
Really my only complaint is I don't think String.len() should exist, it's too ambiguous. We should have to explicitly state what we want/mean via the iterators. | ||||||||
▲ | pron 6 days ago | parent | next [-] | |||||||
Similar to Java:
| ||||||||
▲ | westurner 6 days ago | parent | prev [-] | |||||||
That's a real nice API. (Similarly, python has @ for matmul but there is not an implementation of matmul in stdlib. NumPy has a matmul implementation so that the `@` operator works.)ugrapheme and ucwidth are one way to get the graphene count from a string in Python. It's probably possible to get the grapheme cluster count from a string containing emoji characters with ICU? | ||||||||
|