@@ -2836,7 +2836,8 @@ str2list({expr} [, {utf8}]) List convert each character of {expr} to
28362836str2nr({expr} [, {base} [, {quoted}]])
28372837 Number convert String to Number
28382838strcharpart({str}, {start} [, {len}])
2839- String {len} characters of {str} at {start}
2839+ String {len} characters of {str} at
2840+ character {start}
28402841strchars({expr} [, {skipcc}]) Number character length of the String {expr}
28412842strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
28422843strftime({format} [, {time}]) String format time with a specified format
@@ -2845,8 +2846,9 @@ stridx({haystack}, {needle} [, {start}])
28452846 Number index of {needle} in {haystack}
28462847string({expr}) String String representation of {expr} value
28472848strlen({expr}) Number length of the String {expr}
2848- strpart({str}, {start} [, {len}])
2849- String {len} bytes of {str} at byte {start}
2849+ strpart({str}, {start} [, {len} [, {chars}]])
2850+ String {len} bytes/chars of {str} at
2851+ byte {start}
28502852strptime({format}, {timestring})
28512853 Number Convert {timestring} to unix timestamp
28522854strridx({haystack}, {needle} [, {start}])
@@ -3418,7 +3420,8 @@ byte2line({byte}) *byte2line()*
34183420
34193421byteidx({expr}, {nr}) *byteidx()*
34203422 Return byte index of the {nr}'th character in the string
3421- {expr}. Use zero for the first character, it returns zero.
3423+ {expr}. Use zero for the first character, it then returns
3424+ zero.
34223425 This function is only useful when there are multibyte
34233426 characters, otherwise the returned value is equal to {nr}.
34243427 Composing characters are not counted separately, their byte
@@ -9948,17 +9951,22 @@ strlen({expr}) The result is a Number, which is the length of the String
99489951 {expr} in bytes.
99499952 If the argument is a Number it is first converted to a String.
99509953 For other types an error is given.
9951- If you want to count the number of multi-byte characters use
9954+ If you want to count the number of multibyte characters use
99529955 |strchars()|.
99539956 Also see |len()|, |strdisplaywidth()| and |strwidth()|.
99549957
99559958 Can also be used as a |method|: >
99569959 GetString()->strlen()
99579960
9958- strpart({src}, {start} [, {len}]) *strpart()*
9961+ strpart({src}, {start} [, {len} [, {chars}] ]) *strpart()*
99599962 The result is a String, which is part of {src}, starting from
99609963 byte {start}, with the byte length {len}.
9961- To count characters instead of bytes use |strcharpart()|.
9964+ When {chars} is present and TRUE then {len} is the number of
9965+ characters positions (composing characters are not counted
9966+ separately, thus "1" means one base character and any
9967+ following composing characters).
9968+ To count {start} as characters instead of bytes use
9969+ |strcharpart()|.
99629970
99639971 When bytes are selected which do not exist, this doesn't
99649972 result in an error, the bytes are simply omitted.
@@ -9970,8 +9978,8 @@ strpart({src}, {start} [, {len}]) *strpart()*
99709978 strpart("abcdefg", 3) == "defg"
99719979
99729980< Note: To get the first character, {start} must be 0. For
9973- example, to get three bytes under and after the cursor: >
9974- strpart(getline("."), col(".") - 1, 3 )
9981+ example, to get the character under the cursor: >
9982+ strpart(getline("."), col(".") - 1, 1, v:true )
99759983<
99769984 Can also be used as a |method|: >
99779985 GetText()->strpart(5)
0 commit comments