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>
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index dc47f41..48bdc43 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt* For Vim version 9.1. Last change: 2025 Mar 18
+*builtin.txt* For Vim version 9.1. Last change: 2025 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1323,9 +1323,11 @@
See also |str2blob()|
Examples: >
- blob2str(0z6162) returns ["ab"]
- blob2str(0zC2ABC2BB) returns ["«»"]
- blob2str(0zABBB, {'encoding': 'latin1'}) returns ["«»"]
+ blob2str(0z6162) returns ['ab']
+ blob2str(0zC2ABC2BB) returns ['«»']
+ blob2str(0z610A62) returns ['a', 'b']
+ blob2str(0z610062) returns ['a\nb']
+ blob2str(0zABBB, {'encoding': 'latin1'}) returns ['«»']
<
Can also be used as a |method|: >
GetBlob()->blob2str()
@@ -10666,11 +10668,12 @@
See also |blob2str()|
Examples: >
- str2blob(["ab"]) returns 0z6162
- str2blob(["«»"]) returns 0zC2ABC2BB
- str2blob(["a\nb"]) returns 0z610A62
- str2blob(readfile('myfile.txt'))
+ str2blob(["ab"]) returns 0z6162
+ str2blob(["«»"]) returns 0zC2ABC2BB
+ str2blob(["a\nb"]) returns 0z610062
+ str2blob(["a","b"]) returns 0z610A62
str2blob(["«»"], {'encoding': 'latin1'}) returns 0zABBB
+ str2blob(readfile('myfile.txt'))
<
Can also be used as a |method|: >
GetListOfStrings()->str2blob()