Closed altermo closed 11 months ago
Neovim has a function called vim.str_utf_pos which returns the first-byte index of each character in a string. The function has been in the editor since 2021 (#d752cbc) so there's no problem of people needing to have the newest version of neovim.
vim.str_utf_pos
How would you like to redeem your bonus points?
Neovim has a function called
vim.str_utf_pos
which returns the first-byte index of each character in a string. The function has been in the editor since 2021 (#d752cbc) so there's no problem of people needing to have the newest version of neovim.