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)
This commit is contained in:
@ -619,6 +619,8 @@ String manipulation: *string-functions*
|
||||
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 @@ List manipulation: *list-functions*
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user