Hacker News new | past | comments | ask | show | jobs | submit login

Don't Swift and Go support iterating over graphemes? Edit: yes, Swift is mentioned at the bottom of the article.

It'd be great to have a function for that in other scripting languages like Python, Ruby, etc.

There was an interesting sub-thread here on HN a while ago about how a string-of-codepoints is just as bad as a string-of-bytes (subject to truncation, incorrect iteration, incorrect length calculation) and that we should just have string-of-bytes if we can't have string-of-graphemes. I don't agree, but some people felt very strongly about it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: