Skip to main content
Module

x/dpp_vim/deps.ts>fn.str2list

Dark powered plugin manager for Vim/neovim
Latest
function fn.str2list
import { fn } from "https://deno.land/x/dpp_vim@v0.2.0/deps.ts";
const { str2list } = fn;

Return a list containing the number values which represent each character in String {string}. Examples:

str2list(" ")           returns [32]
str2list("ABC")         returns [65, 66, 67]

list2str() does the opposite.

When {utf8} is omitted or zero, the current 'encoding' is used. When {utf8} is TRUE, always treat the String as UTF-8 characters. With UTF-8 composing characters are handled properly:

str2list("á")          returns [97, 769]

Can also be used as a method:

GetString()->str2list()

Parameters

denops: Denops
string: unknown
optional
utf8: unknown

Returns

Promise<unknown[]>