[phobos] UTF-8 string slicing

SHOO zan77137 at nifty.com
Fri Aug 19 07:38:21 PDT 2011

I agree. The special syntax is unnecessary.
I usually used Japanese, but slice of the UTF-8 string has not become
the problem.
When it is necessary that it looks like it, it is effective to use

When I slice it in UTF-8 including the multi-byte character string,
the delimiter is an ASCII code in most cases.
Otherwise, I think that I do not need the special syntax because it is
considerably special processing. (e.g. Regex)

2011/8/19 Walter Bright <walter at digitalmars.com>:
> 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.
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

More information about the phobos mailing list