Char[] confusing

Stewart Gordon smjg_1998 at
Thu Mar 5 18:04:15 PST 2009

Qian Xu wrote:
> IMO, it does not make any sense.
> s[start..end]
>   end - is neither the count of characters in the array slice,
>            nor the end index of the slice.
>         it is just the index after the real end character.

It might help to think of the indexes in a slice as numbering the 
boundaries between the array elements, rather than the elements themselves.


More information about the Digitalmars-d-learn mailing list