Unicode handling comparison

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Nov 27 10:12:33 PST 2013


On Wed, Nov 27, 2013 at 10:07:43AM -0800, Andrei Alexandrescu wrote:
> On 11/27/13 7:43 AM, Jakob Ovrum wrote:
> >On that note, I tried to use std.uni to write a simple example of how
> >to correctly handle this in D, but it became apparent that std.uni
> >should expose something like `byGrapheme` which lazily transforms a
> >range of code points to a range of graphemes (probably needs a
> >`byCodePoint` to do the converse too). The two extant grapheme
> >functions, `decodeGrapheme` and `graphemeStride`, are *awful* for
> >string manipulation (granted, they are probably perfect for text
> >rendering).
> 
> Yah, byGrapheme would be a great addition.
[...]

+1. This is better than the GraphemeString / i18nString proposal
elsewhere in this thread, because it discourages people from using
graphemes (poor performance) unless where actually necessary.


T

-- 
He who laughs last thinks slowest.


More information about the Digitalmars-d mailing list