patch 8.2.2344: using inclusive index for slice is not always desired
Problem: Using inclusive index for slice is not always desired.
Solution: Add the slice() method, which has an exclusive index. (closes
#7408)
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index bac064c..5d4686a 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -619,6 +619,8 @@
submatch() get a specific match in ":s" and substitute()
strpart() get part of a string using byte index
strcharpart() get part of a string using char index
+ slice() take a slice of a string, using char index in
+ Vim9 script
strgetchar() get character from a string using char index
expand() expand special keywords
expandcmd() expand a command like done for `:edit`
@@ -648,6 +650,7 @@
map() change each List item
mapnew() make a new List with changed items
reduce() reduce a List to a value
+ slice() take a slice of a List
sort() sort a List
reverse() reverse the order of a List
uniq() remove copies of repeated adjacent items