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

x/ddc_vim/deps.ts>fn.strlen

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

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>