diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-08-24 14:41:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 14:41:31 +0100 |
commit | b1eaa2b9a3bae46f6dcbab8dc3a84e0044b11317 (patch) | |
tree | 486a0a3f0118952157e38edad14f71ca16922a77 /runtime | |
parent | 9be4bfc5f4951976131e5e99ecf05882f6767fb4 (diff) | |
download | rneovim-b1eaa2b9a3bae46f6dcbab8dc3a84e0044b11317.tar.gz rneovim-b1eaa2b9a3bae46f6dcbab8dc3a84e0044b11317.tar.bz2 rneovim-b1eaa2b9a3bae46f6dcbab8dc3a84e0044b11317.zip |
feat(lua): add vim.iconv (#18286)
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/lua.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 42f3a5e432..28d5605c2d 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -881,6 +881,22 @@ vim.str_byteindex({str}, {index} [, {use_utf16}]) *vim.str_byteindex()* An {index} in the middle of a UTF-16 sequence is rounded upwards to the end of that sequence. +vim.iconv({str}, {from}, {to}[, {opts}]) *vim.iconv()* + The result is a String, which is the text {str} converted from + encoding {from} to encoding {to}. When the conversion fails `nil` is + returned. When some characters could not be converted they + are replaced with "?". + The encoding names are whatever the iconv() library function + can accept, see ":Man 3 iconv". + + Parameters: ~ + {str} (string) Text to convert + {from} (string) Encoding of {str} + {to} (string) Target encoding + + Returns: ~ + Converted string if conversion succeeds, `nil` otherwise. + vim.schedule({callback}) *vim.schedule()* Schedules {callback} to be invoked soon by the main event-loop. Useful to avoid |textlock| or other temporary restrictions. |