Update chapters/35.markdown
Note that you can’t use negative indices with strings, only slices with negative indices.
author |
ZyX-I <kp-pav@ya.ru> |
date |
Sun, 19 Aug 2012 12:57:07 +0400 |
parents |
7a638cd48d48
|
children |
255d5232b0f6
|
branches/tags |
(none) |
files |
chapters/35.markdown |
Changes
--- 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
-------------