[patch][doc] Fix description of strcharpart()

14 views
Skip to first unread message

Ken Takata

unread,
Jan 10, 2017, 7:39:02 AM1/10/17
to vim_dev
Hi,

The function strcharpart() uses character index instead of byte index.
Therefore "one byte" should be "one character", I think.

--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -7256,7 +7256,7 @@ strcharpart({src}, {start}[, {len}]) *
Like |strpart()| but using character index and length instead
of byte index and length.
When a character index is used where a character does not
- exist it is assumed to be one byte. For example: >
+ exist it is assumed to be one character. For example: >
strcharpart('abc', -1, 2)
< results in 'a'.

Regards,
Ken Takata

Bram Moolenaar

unread,
Jan 10, 2017, 7:47:54 AM1/10/17
to vim...@googlegroups.com, Ken Takata

Ken Takata wrote:

> The function strcharpart() uses character index instead of byte index.
> Therefore "one byte" should be "one character", I think.

Thanks!

--
hundred-and-one symptoms of being an internet addict:
242. You turn down a better-paying job because it doesn't come with
a free e-mail account.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages