import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { string } = fn;
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