in reply to Re^43: Interleaving bytes in a string quickly
in thread Interleaving bytes in a string quickly

I'm expecting the offset in the second string to be 10, not 13!

  • Comment on Re^44: Interleaving bytes in a string quickly

Replies are listed 'Best First'.
Re^45: Interleaving bytes in a string quickly
by ikegami (Patriarch) on Mar 03, 2010 at 04:05 UTC
    2^10 = 0x400, so you got the right char.

      It's still broken if the offsets are wrong.

        I don't understand. It got the 10th offset like you requested. The first contains 0x1, the second 0x2, ..., the 10th 0x400. I don't know where you get 13 from.

        Oh! I see the 13 now. I didn't realize there was useful data in that junk.

        Like I said earlier, you are using a version that only worked on bytes, and only when they are in the UTF8=0 format. In the newer version, that limitation has been removed and that bug has been fixed.