Mercurial > vim
diff runtime/doc/usr_41.txt @ 29712:bdb31515f78b v9.0.0196
patch 9.0.0196: finding value in list may require a for loop
Commit: https://github.com/vim/vim/commit/b218655d5a485f5b193fb18d7240837d42b89812
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Aug 13 13:09:20 2022 +0100
patch 9.0.0196: finding value in list may require a for loop
Problem: Finding value in list may require a for loop.
Solution: Add indexof(). (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10903)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 13 Aug 2022 14:15:05 +0200 |
parents | 2198955f9e27 |
children | 761631155a90 |
line wrap: on
line diff
--- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -792,14 +792,16 @@ List manipulation: *list-functions* 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 + reverse() reverse the order of a List or Blob uniq() remove copies of repeated adjacent items split() split a String into a List join() join List items into a String range() return a List with a sequence of numbers string() String representation of a List call() call a function with List as arguments - index() index of a value in a List + index() index of a value in a List or Blob + indexof() index in a List or Blob where an expression + evaluates to true max() maximum value in a List min() minimum value in a List count() count number of times a value appears in a List