import { fn } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { list2str } = fn;
Convert each number in {list} to a character string can concatenate them all. Examples:
list2str([32]) returns " "
list2str([65, 66, 67]) returns "ABC"
The same can be done (slowly) with:
join(map(list, {nr, val -> nr2char(val)}), '')
str2list()
does the opposite.
When {utf8} is omitted or zero, the current 'encoding' is used. When {utf8} is TRUE, always return UTF-8 characters. With UTF-8 composing characters work as expected:
list2str([97, 769]) returns "á"
Returns an empty string on error.
Can also be used as a method
:
GetList()->list2str()