On Fri, 23 Feb 2018, Sven Schreiber wrote:
not sure if this is intended (probably), or just an oversight from
0-based to 1-based indexing:
string ss = "abc"
eval ss + 1 # gives "bc"
The doc (ch. 14) says: " ...starting at the given character offset." Normally
I would interpret "starting at" meaning "right there", so in the
example starting from the 1st character ("a"). OTOH I can see that an
"offset" could mean "right after that".
I tend to think this isn't a bug, but perhaps the doc could be reformulated
as "starting at the character after the given offset".
I think it's maybe a language thing. Even if indexing is 1-based,
taking an _offset_ of 1 means starting at the second element: the
first element (however it's indexed) plus 1.