]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): update and correct str2blob() and blob2str() examples
authorHirohito Higashi <h.east.727@gmail.com>
Sun, 23 Mar 2025 09:20:20 +0000 (10:20 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 23 Mar 2025 09:20:20 +0000 (10:20 +0100)
closes: #16952

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/builtin.txt

index dc47f410b25d7fd3f282d6f34e171c625c18b16e..48bdc43a398673b1595a8725cfd193d30d573066 100644 (file)
@@ -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 @@ blob2str({blob} [, {options}])                           *blob2str()*
                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 @@ str2blob({list} [, {options}])                                        *str2blob()*
                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()