On Fri, 19 Nov 2010 06:21:45 +0900, Shin Fujishiro <[email protected]> wrote:

"Masahiro Nakagawa" <[email protected]> wrote:
* char version of stride

I removed assert because the comment says "0xFF meaning s[i] is not the
start of of UTF-8 sequence.".
Until now, my library checked 0xFF :(

Shouldn't it throw an exception?  Consider this use of stride() with a
broken UTF-8 string:

  broken[broken.stride(0) .. $]

It silently succeeds if 'broken' is longer or equal to 255 bytes.


Hmm... I don't know the correct behavior. DDoc is outdated?
TDPL exmaple uses your code. If TDPL is correct, I will revert char version of stride.


Masahiro
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to