40878Re: vim7: changed behavior of split()
- Oct 5, 2005Dnia środa, 5 października 2005 21:20, A. J. Mechelynck napisał:
>OK. I was asking because previously split("") was returning [""].
> 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
> 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).
- << Previous post in topic Next post in topic >>