[phobos] UTF-8 string slicing

Walter Bright walter at digitalmars.com
Fri Aug 19 05:41:18 PDT 2011



Sean Kelly wrote:
>
> I need to do this from time to time, but I generally just do something like:
>
> buf[0 .. buf.toUCSindex(n)]
>
> A shorthand might be nice though, I suppose.
>
>   

Somewhat surprisingly, such a function is rarely needed (I've never 
needed it in working with UTF8)
and so I don't think a special syntax for it is justified.


More information about the phobos mailing list