--- a/CharacterArray.st Sun Sep 01 00:37:43 2013 +0200
+++ b/CharacterArray.st Mon Sep 02 17:06:20 2013 +0200
@@ -2558,23 +2558,26 @@
!
asCollectionOfSubstringsSeparatedBy:aCharacter
- "return a collection containing the lines (separated by aCharacter)
- of the receiver. If aCharacter occurs multiple times in a row,
- the result will contain empty strings."
+ "return a collection containing substrings (separated by aCharacter)
+ of the receiver.
+ If aCharacter occurs multiple times in a row, the result will contain empty strings.
+ If the receiver ends with aCharacter, an empty string with be the last result element."
^ self asCollectionOfSubCollectionsSeparatedBy:aCharacter
"
- '1 one:2 two:3 three:4 four:5 five' withCRs asCollectionOfSubstringsSeparatedBy:$:
- '1 one 2 two 3 three 4 four 5 five' withCRs asCollectionOfSubstringsSeparatedBy:Character space
+ '1 one:2 two:3 three:4 four:5 five' asCollectionOfSubstringsSeparatedBy:$:
+ '1 one:2 two:3 three:4 four:5 five:' asCollectionOfSubstringsSeparatedBy:$:
+ '1 one 2 two 3 three 4 four 5 five' asCollectionOfSubstringsSeparatedBy:Character space
"
!
asCollectionOfSubstringsSeparatedBy:aCharacter exceptIn:ch
- "return a collection containing the lines (separated by aCharacter)
+ "return a collection containing the substrings (separated by aCharacter)
of the receiver. If aCharacter occurs multiple times in a row,
- the result will contain empty strings. The separation is not done,
- inside a matching pair of ch-substrings. Can be used to tokenize csv-like strings."
+ the result will contain empty strings.
+ The separation is not done, inside a matching pair of ch-substrings.
+ Can be used to tokenize csv-like strings, which may or may not be enclosed in quotes."
|lines myClass except i c
startIndex "{ Class:SmallInteger }"
@@ -5208,6 +5211,7 @@
"Modified: 17.4.1997 / 12:50:23 / cg"
! !
+
!CharacterArray methodsFor:'special string converting'!
expandPlaceholders:escapeCharacter with:argArrayOrDictionary
@@ -6715,11 +6719,11 @@
!CharacterArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.513 2013-08-31 19:22:51 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.514 2013-09-02 15:06:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.513 2013-08-31 19:22:51 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.514 2013-09-02 15:06:20 cg Exp $'
! !