Arc Forumnew | comments | leaders | submitlogin
2 points by duaneb 6126 days ago | link | parent

...so that means that (cut "foobar" 0 0) is "foobar"? How does that make sense?

I think that the -1 ending the string makes more sense when you take the zero into account.



5 points by nex3 6126 days ago | link

(cut "foobar" 0 0) is "", just like (cut "foobar" 1 1) and (cut "foobar" 42 42). 0 isn't a negative number.

-----

5 points by andreyf 6126 days ago | link

As pointed out above, (cut "foobar" 0 0) is "", and (cut "foobar" 1) is "oobar".

-----