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

x/denops_std/function/mod.ts>strgetchar

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

Get a Number corresponding to the character at {index} in {str}. This uses a zero-based character index, not a byte index. Composing characters are considered separate characters here. Use nr2char() to convert the Number to a String. Returns -1 if {index} is invalid. Also see strcharpart() and strchars().

Can also be used as a method:

GetText()->strgetchar(5)

Parameters

denops: Denops
str: unknown
index: unknown

Returns

Promise<number>