docs: various clarifications (#24876)

This commit is contained in:
zeertzjq
2023-08-26 08:35:05 +08:00
committed by GitHub
parent 5d8ab32f38
commit b1cfb299df
10 changed files with 43 additions and 41 deletions

View File

@@ -979,12 +979,12 @@ vim.str_utf_end({str}, {index}) *vim.str_utf_end()*
Examples: >lua
-- The character 'æ' are equal to the bytes '\xc3\xa6' (using UTF-8)
-- The character 'æ' is stored as the bytes '\xc3\xa6' (using UTF-8)
-- Returns 0 because the index is pointing at the last byte of a character
vim.str_utf_end('æ', 2)
-- Returns 1 because the index is pointing at the second last byte of a character
-- Returns 1 because the index is pointing at the penultimate byte of a character
vim.str_utf_end('æ', 1)
<
@@ -1016,7 +1016,7 @@ vim.str_utf_start({str}, {index}) *vim.str_utf_start()*
Examples: >lua
-- The character 'æ' are equal to the bytes '\xc3\xa6' (using UTF-8)
-- The character 'æ' is stored as the bytes '\xc3\xa6' (using UTF-8)
-- Returns 0 because the index is pointing at the first byte of a character
vim.str_utf_start('æ', 1)