I was working on detecting whitespaces in my array when I stumbled upon something very interesting.
I was thinking an array is something like [0][1][2][3][4] ...
However ... when I display all my indexes it seems each individual character/object/string has a unique index.
So it would follow something like this:
[t][e][t] = [0][1][2][0]
Is it normal? Should it not be [0][1][2][3]?
I dont complain since this makes my whitespace ignoring routine more easy because each whitespace has the same index ... but it does make one wonder.
I was thinking an array is something like [0][1][2][3][4] ...
However ... when I display all my indexes it seems each individual character/object/string has a unique index.
So it would follow something like this:
[t][e]
Is it normal? Should it not be [0][1][2][3]?
I dont complain since this makes my whitespace ignoring routine more easy because each whitespace has the same index ... but it does make one wonder.