Skip to main content
Module

x/denops_std/function/mod.ts>len

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

When {expr} is a String or a Number the length in bytes is used, as with |strlen()|. When {expr} is a |List| the number of items in the |List| is returned. When {expr} is a |Blob| the number of bytes is returned. When {expr} is a |Dictionary| the number of entries in the |Dictionary| is returned. Otherwise an error is given. Can also be used as a |method|: mylist->len()

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>