Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.strcharpart

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.strcharpart
import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { strcharpart } = fn;

Like strpart() but using character index and length instead of byte index and length. When {skipcc} is omitted or zero, composing characters are counted separately. When {skipcc} set to 1, Composing characters are ignored, similar to slice(). When a character index is used where a character does not exist it is omitted and counted as one character. For example:

strcharpart('abc', -1, 2)

results in 'a'.

Returns an empty string on error.

Can also be used as a method:

GetText()->strcharpart(5)

Parameters

denops: Denops
src: unknown
start: unknown
optional
len: unknown
optional
skipcc: unknown

Returns

Promise<string>