diff options
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 2b79feec8e..2c594e049f 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -9845,15 +9845,18 @@ function vim.fn.tr(src, fromstr, tostr) end --- Return {text} as a String where any character in {mask} is --- removed from the beginning and/or end of {text}. ---- If {mask} is not given, {mask} is all characters up to 0x20, ---- which includes Tab, space, NL and CR, plus the non-breaking ---- space character 0xa0. +--- +--- If {mask} is not given, or is an empty string, {mask} is all +--- characters up to 0x20, which includes Tab, space, NL and CR, +--- plus the non-breaking space character 0xa0. +--- --- The optional {dir} argument specifies where to remove the --- characters: --- 0 remove from the beginning and end of {text} --- 1 remove only at the beginning of {text} --- 2 remove only at the end of {text} --- When omitted both ends are trimmed. +--- --- This function deals with multibyte characters properly. --- Returns an empty string on error. --- |