comparison runtime/doc/eval.txt @ 293:f811be6fa9b5

updated for version 7.0077
author vimboss
date Tue, 31 May 2005 22:14:58 +0000
parents 33d9c918b8ab
children 6a21eb563c34
comparison
equal deleted inserted replaced
292:bf6ee000a80c 293:f811be6fa9b5
1 *eval.txt* For Vim version 7.0aa. Last change: 2005 May 22 1 *eval.txt* For Vim version 7.0aa. Last change: 2005 May 31
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
3741 each white-separated sequence of characters becomes an item. 3741 each white-separated sequence of characters becomes an item.
3742 Otherwise the string is split where {pattern} matches, 3742 Otherwise the string is split where {pattern} matches,
3743 removing the matched characters. 3743 removing the matched characters.
3744 When the first or last item is empty it is omitted, unless the 3744 When the first or last item is empty it is omitted, unless the
3745 {keepempty} argument is given and it's non-zero. 3745 {keepempty} argument is given and it's non-zero.
3746 Other empty items are kept when {pattern} matches at least one
3747 character or when {keepempty} is non-zero.
3746 Example: > 3748 Example: >
3747 :let words = split(getline('.'), '\W\+') 3749 :let words = split(getline('.'), '\W\+')
3748 < To split a string in individual characters: > 3750 < To split a string in individual characters: >
3749 :for c in split(mystring, '\zs') 3751 :for c in split(mystring, '\zs')
3750 < If you want to keep the separator you can also use '\zs': > 3752 < If you want to keep the separator you can also use '\zs': >