Yukihiro Nakadaira wrote:

> split(",,,x,,,", ",") returns ["x", "", ""].  I think expected result is
> ["x"].

The documentation says that only empty items at the start and end are
dropped, thus the result should be ["", "", "x", "", ""].

But I can see you would like to drop all empty items.  Or all empty
items at the start and end.

So far the keepempty argument was zero or non-zero.  If we make it a
string then we can pass different flags:
        0   default - drop empty items at start and end
        1   keep all empty items
        'd'  drop all empty items
        's'  drop one empty item at start
        'e'  drop one empty item at end
        'se' drop one empty item at start and end

How about that?

-- 
   Another bucket of what can only be described as human ordure hits ARTHUR.
ARTHUR: ... Right!  (to the KNIGHTS) That settles it!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.

Raspunde prin e-mail lui