diff options
Diffstat (limited to 'src/nvim/eval.lua')
-rw-r--r-- | src/nvim/eval.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 46d17d8c03..eec3c68e0f 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -11805,15 +11805,18 @@ M.funcs = { desc = [=[ 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. |