Skip to main content
Module

x/denops_std/function/mod.ts>strlen

📚 Standard module for denops.vim
Go to Latest
function strlen
import { strlen } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

The result is a Number, which is the length of the String {string} in bytes. If the argument is a Number it is first converted to a String. For other types an error is given and zero is returned. If you want to count the number of multibyte characters use strchars(). Also see len(), strdisplaywidth() and strwidth().

Can also be used as a method:

GetString()->strlen()

Parameters

denops: Denops
string: unknown

Returns

Promise<number>