The only thing different in this 2 codes in index number, one is 1 and one is 0, but both produce the same result.

If my string is 123456, they both return: 1234and that's what got me confused.