Mercurial > vim
diff runtime/doc/usr_41.txt @ 23604:1816ea68c022 v8.2.2344
patch 8.2.2344: using inclusive index for slice is not always desired
Commit: https://github.com/vim/vim/commit/6601b62943a19d4f8818c3638440663d67a17b6a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 13 21:47:15 2021 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 Jan 2021 22:00:04 +0100 |
parents | 7b3317e959e3 |
children | 96206643bd9f |
line wrap: on
line diff
--- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -619,6 +619,8 @@ String manipulation: *string-functio 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