Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>slice

๐Ÿ“š Standard module for denops.vim
Go to Latest
function slice
import { slice } from "https://deno.land/x/denops_std@v3.7.0/function/vim/mod.ts";

Similar to using a |slice| "expr[start : end]", but "end" is used exclusive. And for a string the indexes are used as character indexes instead of byte indexes, like in |vim9script|. Also, composing characters are not counted. When {end} is omitted the slice continues to the last item. When {end} is -1 the last item is omitted. Can also be used as a |method|: GetList()->slice(offset)

Parameters

denops: Denops
expr: unknown
start: unknown
optional
end: unknown

Returns

Promise<unknown>