Re: split() into individual chars (evening CVS)
- Dnia środa 25 maj 2005 11:42, Bram Moolenaar napisał:
> Mikolaj Machowski wrote:Ha. Try
> > Why previous method of splitting string into individual characters was
> > changed?
> > split('string', '') was quite nice and worked
> > advertised
> > split('string', '\zs')
> > returns
> > ['s', '', 't', '', 'r', '', 'i', '', 'n', '', 'g']
> > Which is all but expected...
> That's a side effect of keeping empty items when splitting "aaa::bbb"
> into ['aaa', '', 'bbb'].
> Obviously you don't want empty items when the pattern match is empty.
> I'll see how that can be done without making it complicated.
Just one, small correction in docs.