Skip to main content
Module

x/denops_std/function/mod.ts>strwidth

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

The result is a Number, which is the number of display cells String {string} occupies. A Tab character is counted as one cell, alternatively use |strdisplaywidth()|. When {string} contains characters with East Asian Width Class Ambiguous, this function's return value depends on 'ambiwidth'. Also see |strlen()|, |strdisplaywidth()| and |strchars()|. Can also be used as a |method|: GetString()->strwidth()

Parameters

denops: Denops
string: unknown

Returns

Promise<unknown>