summaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-06-25 16:09:26 +0200
committerBram Moolenaar <Bram@vim.org>2015-06-25 16:09:26 +0200
commit641e48c2248ccb3c25a5cdaa3709f16152d8c77d (patch)
treea172d568851003cf7357ff228262e1905263d9d5 /runtime/doc
parent3a304b23823b089e499063e8211c5695d049f3ba (diff)
downloadvim-641e48c2248ccb3c25a5cdaa3709f16152d8c77d.zip
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)
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/eval.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 44abae624..223c36393 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1985,7 +1985,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}])
@@ -5913,15 +5913,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