diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-06-14 13:10:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-06-14 13:10:15 +0100 |
commit | 95707037afa1aeae4f3494dc623a721ceed7fc4e (patch) | |
tree | dd5ec603dd3c1a0d890140e84a99cbbf170cbb15 /runtime | |
parent | d5b952a871835b057176fd37fc91b971e8e3f300 (diff) |
patch 9.0.1629: having utf16idx() rounding up is inconvenientv9.0.1629
Problem: Having utf16idx() rounding up is inconvenient.
Solution: Make utf16idx() round down. (Yegappan Lakshmanan, closes #12523)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index b14851ca89..1b7c6dcc6e 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -10127,8 +10127,8 @@ utf16idx({string}, {idx} [, {countcc} [, {charidx}]]) When {charidx} is present and TRUE, {idx} is used as the character index in the String {string} instead of as the byte index. - An {idx} in the middle of a UTF-8 sequence is rounded upwards - to the end of that sequence. + An {idx} in the middle of a UTF-8 sequence is rounded + downwards to the beginning of that sequence. Returns -1 if the arguments are invalid or if there are less than {idx} bytes in {string}. If there are exactly {idx} bytes |