4 ms·
Yep. On Apple platforms there is basically just ONE way to do this conveniently and correctly: an enumeration function on NSString that visits composed charact
by makecheck 10y ago
Yep. On Apple platforms there is basically just ONE way to do this conveniently and correctly: an enumeration function on NSString that visits composed character sequences individually, as substrings. And, it was only added in OS 10.6, which shows how slow the evolution of correct Unicode processing can be.
And, there is still no completely reliable way to guess the cell/column width of a symbol just by looking at it, especially if your goal is to be consistent with any other interpreter of the string (like a text editor). Still heuristics at best for any case outside common tables like CJK.