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

40878Re: vim7: changed behavior of split()

Expand Messages
  • Mikolaj Machowski
    Oct 5, 2005
    • 0 Attachment
      Dnia środa, 5 października 2005 21:20, A. J. Mechelynck napisał:
      >
      > split("") returns a list of zero elements
      > split("asdf") returns a list of one element
      > split("asdf qwer") returns a list of two elements
      > split("asdf qwer uiop") returns a list of three elements
      > split("asdf qwer uiop hjkl") returns a list of four elements
      > etc.
      >
      > Returning a list of one empty element, rather than zero element, _that_
      > would be "special" and "abnormal" handling. Or else split() should
      > return an additional empty element at the end of the list in all cases,
      > but there is no need for that since we can test l(list).

      OK. I was asking because previously split("") was returning [""].

      m.
    • Show all 8 messages in this topic