On 30/03/14 22:46, Dmitry Frank wrote: > let my_str = "こんにちわ世界" > let match_start = match(my_str, "世界", 0, 1) > echo strchars(my_str[: match_start - 1]) So it is.
And the reason I didn't know about this cunning trick is due to a documentation bug. The function strchars() works perfectly in my version of ViM 7.3.475 but a scan of the online help yields no reference to strchars() anywhere. It is *completely* hidden (except if I rummage through the source code). Furthermore, in the online (internet) help, the function appears here: http://vimdoc.sourceforge.net/htmldoc/eval.html#functions but not here: http://vimdoc.sourceforge.net/htmldoc/usr_41.html#41.6 I always use the second page for functional reference as its grouped by data object type/functional category which is far easier to navigate if I'm looking for a function to do something I haven't done before. Like process Japanese string data, for example. Well, now I know. Thanks very much for your insights. -- -- 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. For more options, visit https://groups.google.com/d/optout.