Skip to main content
Module

x/denops_std/function/mod.ts>string

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

Return {expr} converted to a String. If {expr} is a Number, Float, String, Blob or a composition of them, then the result can be parsed back with eval(). {expr} type result String 'string' (single quotes are doubled) Number 123 Float 123.123456 or 1.123456e8 Funcref function('name') Blob 0z00112233.44556677.8899 List [item, item] Dictionary {key: value, key: value} Class class SomeName Object object of SomeName {lnum: 1, col: 3}

When a List or Dictionary has a recursive reference it is replaced by "[...]" or "{...}". Using eval() on the result will then fail.

Can also be used as a method:

mylist->string()

Also see strtrans().

Parameters

denops: Denops
expr: unknown

Returns

Promise<string>