@@ -2848,7 +2848,8 @@ str2list({expr} [, {utf8}]) List convert each character of {expr} to
28482848str2nr({expr} [, {base} [, {quoted}]])
28492849 Number convert String to Number
28502850strcharpart({str}, {start} [, {len}])
2851- String {len} characters of {str} at {start}
2851+ String {len} characters of {str} at
2852+ character {start}
28522853strchars({expr} [, {skipcc}]) Number character length of the String {expr}
28532854strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
28542855strftime({format} [, {time}]) String format time with a specified format
@@ -2857,8 +2858,9 @@ stridx({haystack}, {needle} [, {start}])
28572858 Number index of {needle} in {haystack}
28582859string({expr}) String String representation of {expr} value
28592860strlen({expr}) Number length of the String {expr}
2860- strpart({str}, {start} [, {len}])
2861- String {len} bytes of {str} at byte {start}
2861+ strpart({str}, {start} [, {len} [, {chars}]])
2862+ String {len} bytes/chars of {str} at
2863+ byte {start}
28622864strptime({format}, {timestring})
28632865 Number Convert {timestring} to unix timestamp
28642866strridx({haystack}, {needle} [, {start}])
@@ -3430,7 +3432,8 @@ byte2line({byte}) *byte2line()*
34303432
34313433byteidx({expr}, {nr}) *byteidx()*
34323434 Return byte index of the {nr}'th character in the string
3433- {expr}. Use zero for the first character, it returns zero.
3435+ {expr}. Use zero for the first character, it then returns
3436+ zero.
34343437 This function is only useful when there are multibyte
34353438 characters, otherwise the returned value is equal to {nr}.
34363439 Composing characters are not counted separately, their byte
@@ -9960,17 +9963,22 @@ strlen({expr}) The result is a Number, which is the length of the String
99609963 {expr} in bytes.
99619964 If the argument is a Number it is first converted to a String.
99629965 For other types an error is given.
9963- If you want to count the number of multi-byte characters use
9966+ If you want to count the number of multibyte characters use
99649967 |strchars()|.
99659968 Also see |len()|, |strdisplaywidth()| and |strwidth()|.
99669969
99679970 Can also be used as a |method|: >
99689971 GetString()->strlen()
99699972
9970- strpart({src}, {start} [, {len}]) *strpart()*
9973+ strpart({src}, {start} [, {len} [, {chars}] ]) *strpart()*
99719974 The result is a String, which is part of {src}, starting from
99729975 byte {start}, with the byte length {len}.
9973- To count characters instead of bytes use |strcharpart()|.
9976+ When {chars} is present and TRUE then {len} is the number of
9977+ characters positions (composing characters are not counted
9978+ separately, thus "1" means one base character and any
9979+ following composing characters).
9980+ To count {start} as characters instead of bytes use
9981+ |strcharpart()|.
99749982
99759983 When bytes are selected which do not exist, this doesn't
99769984 result in an error, the bytes are simply omitted.
@@ -9982,8 +9990,8 @@ strpart({src}, {start} [, {len}]) *strpart()*
99829990 strpart("abcdefg", 3) == "defg"
99839991
99849992< Note: To get the first character, {start} must be 0. For
9985- example, to get three bytes under and after the cursor: >
9986- strpart(getline("."), col(".") - 1, 3 )
9993+ example, to get the character under the cursor: >
9994+ strpart(getline("."), col(".") - 1, 1, v:true )
99879995<
99889996 Can also be used as a |method|: >
99899997 GetText()->strpart(5)
0 commit comments