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@v6.4.0/function/mod.ts";

The result is a Number, which is the length of the argument. 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 and returns zero.

Can also be used as a method:

mylist->len()

Parameters

denops: Denops
expr: unknown

Returns

Promise<number>