Skip to content

Commit 932a535

Browse files
h-eastchrisbra
authored andcommitted
runtime(doc): update and correct str2blob() and blob2str() examples
closes: #16952 Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent e14aa3c commit 932a535

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

runtime/doc/builtin.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2025 Mar 18
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Mar 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1323,9 +1323,11 @@ blob2str({blob} [, {options}]) *blob2str()*
13231323
See also |str2blob()|
13241324

13251325
Examples: >
1326-
blob2str(0z6162) returns ["ab"]
1327-
blob2str(0zC2ABC2BB) returns ["«»"]
1328-
blob2str(0zABBB, {'encoding': 'latin1'}) returns ["«»"]
1326+
blob2str(0z6162) returns ['ab']
1327+
blob2str(0zC2ABC2BB) returns ['«»']
1328+
blob2str(0z610A62) returns ['a', 'b']
1329+
blob2str(0z610062) returns ['a\nb']
1330+
blob2str(0zABBB, {'encoding': 'latin1'}) returns ['«»']
13291331
<
13301332
Can also be used as a |method|: >
13311333
GetBlob()->blob2str()
@@ -10666,11 +10668,12 @@ str2blob({list} [, {options}]) *str2blob()*
1066610668
See also |blob2str()|
1066710669

1066810670
Examples: >
10669-
str2blob(["ab"]) returns 0z6162
10670-
str2blob(["«»"]) returns 0zC2ABC2BB
10671-
str2blob(["a\nb"]) returns 0z610A62
10672-
str2blob(readfile('myfile.txt'))
10671+
str2blob(["ab"]) returns 0z6162
10672+
str2blob(["«»"]) returns 0zC2ABC2BB
10673+
str2blob(["a\nb"]) returns 0z610062
10674+
str2blob(["a","b"]) returns 0z610A62
1067310675
str2blob(["«»"], {'encoding': 'latin1'}) returns 0zABBB
10676+
str2blob(readfile('myfile.txt'))
1067410677
<
1067510678
Can also be used as a |method|: >
1067610679
GetListOfStrings()->str2blob()

0 commit comments

Comments
 (0)