Loading ...
Sorry, an error occurred while loading the content.
 

Re: split() into individual chars (evening CVS)

Expand Messages
  • Mikolaj Machowski
    ... Ha. Try split( string , . zs ) ... Just one, small correction in docs. m.
    Message 1 of 3 , May 25, 2005
      Dnia środa 25 maj 2005 11:42, Bram Moolenaar napisał:
      > Mikolaj Machowski wrote:
      > > 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.

      Ha. Try
      split('string', '.\zs')
      :D

      Just one, small correction in docs.

      m.
    Your message has been successfully submitted and would be delivered to recipients shortly.