Philip Martin wrote on Fri, Oct 29, 2010 at 08:58:02 +0100:
> Can we treat the string as a bytes and just increment and carry?

No, this might invalidate the UTF-8 sequence.  If a character spans
multiple bytes, then those bytes have header bits of the form /^1+0/
(in regex), so incrementing the byte blindly will eventually invalidate
the byte sequence by turning the 0 into a 1.

Reply via email to