runtime(doc): update and correct str2blob() and blob2str() examples Commit: https://github.com/vim/vim/commit/932a535bfa8f5fef1b367fe927ec27e20c7a866b Author: Hirohito Higashi <h.east....@gmail.com> Date: Sun Mar 23 10:20:20 2025 +0100
runtime(doc): update and correct str2blob() and blob2str() examples closes: https://github.com/vim/vim/issues/16952 Signed-off-by: Hirohito Higashi <h.east....@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index dc47f410b..48bdc43a3 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 @@ 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 b'] + 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 b"]) returns 0z610A62 - str2blob(readfile('myfile.txt')) + str2blob(["ab"]) returns 0z6162 + str2blob(["«»"]) returns 0zC2ABC2BB + str2blob(["a b"]) 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() -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1twHef-00ANgf-Ud%40256bit.org.