Char[] confusing

Rainer Deyke rainerd at eldwood.com
Mon Mar 2 17:55:18 PST 2009


grauzone wrote:
> Think of it as "everything in the string before this."

I tend to think of a indexes as referring to the positions between the
characters instead of the characters themselves.

"ABCD" -> 0 'A' 1 'B' 2 'C' 3 'D' 4

's[a..b]' = the elements betweens positions 'a' and 'b'.
's[a]' = the element to the right of position 'a'.


-- 
Rainer Deyke - rainerd at eldwood.com


More information about the Digitalmars-d-learn mailing list