diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2016-01-30 17:42:22 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-09 01:36:29 -0500 |
commit | a9a25fda42abdec267e89bf607f35e60806ec092 (patch) | |
tree | 91ff2f022e3a79ef13886b44c5479ff16a9944ba /runtime | |
parent | 31aa060bca0084d19eac382408727c5f3b190af3 (diff) | |
download | rneovim-a9a25fda42abdec267e89bf607f35e60806ec092.tar.gz rneovim-a9a25fda42abdec267e89bf607f35e60806ec092.tar.bz2 rneovim-a9a25fda42abdec267e89bf607f35e60806ec092.zip |
vim-patch:7.4.755
Problem: It is not easy to count the number of characters.
Solution: Add the skipcc argument to strchars(). (Hirohito Higashi, Ken
Takata)
https://github.com/vim/vim/commit/641e48c2248ccb3c25a5cdaa3709f16152d8c77d
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index bb7ca77de7..ba59ed7797 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2028,7 +2028,7 @@ split( {expr} [, {pat} [, {keepempty}]]) sqrt( {expr}) Float square root of {expr} str2float( {expr}) Float convert String to Float str2nr( {expr} [, {base}]) Number convert String to Number -strchars( {expr}) Number character length of the String {expr} +strchars( {expr} [, {skipcc}]) Number character length of the String {expr} strdisplaywidth( {expr} [, {col}]) Number display length of the String {expr} strftime( {format}[, {time}]) String time in specified format stridx( {haystack}, {needle}[, {start}]) @@ -6231,15 +6231,11 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number, *strlen()* strlen({expr}) The result is a Number, which is the length of the String {expr} in bytes. - If you want to count the number of multi-byte characters (not - counting composing characters) use something like this: > - - :let len = strlen(substitute(str, ".", "x", "g")) -< If the argument is a Number it is first converted to a String. For other types an error is given. - Also see |len()|, |strchars()|, |strdisplaywidth()| and - |strwidth()|. + If you want to count the number of multi-byte characters use + |strchars()|. + Also see |len()|, |strdisplaywidth()| and |strwidth()|. strpart({src}, {start}[, {len}]) *strpart()* The result is a String, which is part of {src}, starting from |