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)