comparison runtime/doc/eval.txt @ 502:52e76e2b5b65 v7.0140

updated for version 7.0140
author vimboss
date Thu, 01 Sep 2005 20:46:49 +0000
parents 06364aa0d597
children 35cde31bdcbd
comparison
equal deleted inserted replaced
501:ce2181d14aa0 502:52e76e2b5b65
1 *eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 23 1 *eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 31
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
4079 Dictionary {key: value, key: value} 4079 Dictionary {key: value, key: value}
4080 Note that in String values the ' character is doubled. 4080 Note that in String values the ' character is doubled.
4081 4081
4082 *strlen()* 4082 *strlen()*
4083 strlen({expr}) The result is a Number, which is the length of the String 4083 strlen({expr}) The result is a Number, which is the length of the String
4084 {expr} in bytes. If you want to count the number of 4084 {expr} in bytes.
4085 multi-byte characters use something like this: > 4085 If you want to count the number of multi-byte characters (not
4086 counting composing characters) use something like this: >
4086 4087
4087 :let len = strlen(substitute(str, ".", "x", "g")) 4088 :let len = strlen(substitute(str, ".", "x", "g"))
4088 4089 <
4089 < Composing characters are not counted.
4090 If the argument is a Number it is first converted to a String. 4090 If the argument is a Number it is first converted to a String.
4091 For other types an error is given. 4091 For other types an error is given.
4092 Also see |len()|. 4092 Also see |len()|.
4093 4093
4094 strpart({src}, {start}[, {len}]) *strpart()* 4094 strpart({src}, {start}[, {len}]) *strpart()*