Hi, On Tue, Jan 15, 2019 at 1:52 PM Bram Moolenaar <b...@moolenaar.net> wrote: > > > Patch 8.1.0757 > Problem: Not enough documentation for Blobs. > Solution: Add a section about Blobs. > Files: runtime/doc/eval.txt > > > *** ../vim-8.1.0756/runtime/doc/eval.txt 2019-01-13 15:15:54.388762907 > +0100 > --- runtime/doc/eval.txt 2019-01-15 22:48:29.185422882 +0100 > *************** > ! Part of a blob ~ > ! > ! A part of the Blob can be obtained by specifying the first and last index, > ! separated by a colon in square brackets: > > ! :let myblob = 0z00112233 > ! :let shortblob = myblob[2:-1] " get 0z2233 > ! > ! Omitting the first index is similar to zero. Omitting the last index is > ! similar to -1. > > ! :let endblob = myblob[2:] " from item 2 to the end: 0z2233 > ! :let shortblob = myblob[2:2] " Blob with one byte: 0z22 > ! :let otherblob = myblob[:] " make a copy of the Blob > !
> > ! If the first index is beyond the last byte of the Blob or the second byte is > ! before the first byte, the result is an empty list. There is no error > Is this supposed to say "the second index is before the first index, the result is an empty list."? - Yegappan > > ! message. > ! > ! If the second index is equal to or greater than the length of the list the > ! length minus one is used: > > ! :echo myblob[2:8] " result: 0z2233 > ! > ! -- -- 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. For more options, visit https://groups.google.com/d/optout.