Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.8.1/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>