Proposed Phobos equivalent of wcswidth()

Jack Stouffer jack at jackstouffer.com
Mon Jan 15 18:20:16 UTC 2018


On Monday, 15 January 2018 at 17:32:40 UTC, H. S. Teoh wrote:
> On Mon, Jan 15, 2018 at 02:14:56PM +0000, Simen Kjærås via 
> Digitalmars-d wrote:
>> On Monday, 15 January 2018 at 13:34:09 UTC, Jack Stouffer 
>> wrote:
>> > std.utf.displayWidth
>> 
>> +1
> [...]
>
> Why std.utf rather than std.uni, though?

The way I understand it is that std.uni is (supposed to be) for 
functions on individual unicode units (be they code units/points 
or graphemes) and std.utf is for functions which handle operating 
on unicode strings. Obviously there are exceptions. I think 
"they" put graphemeStride in std.uni because Grapheme was defined 
there and it seemed reasonable at the time. But, generally I 
think utf stuff should go into std.utf.


More information about the Digitalmars-d mailing list