# HG changeset patch # User ZyX-I # Date 1345366627 -14400 # Node ID 7a30f287900b880f4505d37ceb64ba83a2ab89d3 # Parent 7a638cd48d4895b9d6bfe6b5a0c33c80d4bbd634 Update chapters/35.markdown Note that you can’t use negative indices with strings, only slices with negative indices. diff -r 7a638cd48d48 -r 7a30f287900b chapters/35.markdown --- a/chapters/35.markdown Sat Jun 16 16:25:45 2012 -0400 +++ b/chapters/35.markdown Sun Aug 19 12:57:07 2012 +0400 @@ -76,7 +76,12 @@ :::vim :echo "abcd"[0:2] -Vim displays "abc". +Vim displays "abc". It does not allow you to use negative indices with strings though: + + :::vim + :echo "abcd"[-1] "abcd"[-1:] + +will echo " d". Concatenation -------------