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

x/ddc_vim/deps.ts>fn.strdisplaywidth

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

The result is a Number, which is the number of display cells String {string} occupies on the screen when it starts at {col} (first column is zero). When {col} is omitted zero is used. Otherwise it is the screen column where to start. This matters for Tab characters. The option settings of the current window are used. This matters for anything that's displayed differently, such as 'tabstop' and 'display'. When {string} contains characters with East Asian Width Class Ambiguous, this function's return value depends on 'ambiwidth'. Returns zero on error. Also see strlen(), strwidth() and strchars().

Can also be used as a method:

GetText()->strdisplaywidth()

Parameters

denops: Denops
string: unknown
optional
col: unknown

Returns

Promise<number>