]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): fix base64 encode/decode examples
authorMaxim Kim <habamax@gmail.com>
Wed, 15 Jan 2025 17:31:05 +0000 (18:31 +0100)
committerChristian Brabandt <cb@256bit.org>
Wed, 15 Jan 2025 17:31:28 +0000 (18:31 +0100)
Use str2blob()/blob2str() functions in examples given.

closes: #16449

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/builtin.txt

index 10970bc51a18b62cdb93136858c6674f3622779e..9ba22dc742d35380d54f9c4564d6b05101080cc1 100644 (file)
@@ -1,4 +1,4 @@
-*builtin.txt*  For Vim version 9.1.  Last change: 2025 Jan 14
+*builtin.txt*  For Vim version 9.1.  Last change: 2025 Jan 15
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1244,7 +1244,7 @@ base64_decode({string})                                   *base64_decode()*
                    " Write the decoded contents to a binary file
                    call writefile(base64_decode(s), 'tools.bmp')
                    " Decode a base64-encoded string
-                   echo list2str(blob2list(base64_decode(encodedstr)))
+                   echo blob2str(base64_decode(encodedstr))
 <
                Can also be used as a |method|: >
                        GetEncodedString()->base64_decode()
@@ -1260,7 +1260,7 @@ base64_encode({blob})                                     *base64_encode()*
                    " Encode the contents of a binary file
                    echo base64_encode(readblob('somefile.bin'))
                    " Encode a string
-                   echo base64_encode(list2blob(str2list(somestr)))
+                   echo base64_encode(str2blob(somestr))
 <
                Can also be used as a |method|: >
                        GetBinaryData()->base64_encode()