Yegappan wrote:

> I have updated the PR to add the utf16idx() function and introduced an
> optional UTF-16 flag to the byteidx() and byteidxcomp() functions.

Hmm, then when converting an UTF-16 index to a character index one would
need to use byteidx() plus charidx().  Not ideal.  See my other message
for a charidx() variant that does this in one step.

Would it be needed to convert an UTF-16 index into a byte index?
Depends on what it is used for, some functions work with a byte index,
others with a character index.  So either we have functions for both, or
there need to be two function calls.  I can't say I have a clear
preference for either.

-- 
User:       I'm having problems with my text editor.
Help desk:  Which editor are you using?
User:       I don't know, but it's version VI (pronounced: 6).
Help desk:  Oh, then you should upgrade to version VIM (pronounced: 994).

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230414195531.EF28B1C0331%40moolenaar.net.

Raspunde prin e-mail lui