#DOCUMENTATION by stefan
class: CharacterArray
comment/format in: #expandNumericPlaceholdersWith:
--- a/CharacterArray.st Mon Sep 09 18:06:34 2019 +0200
+++ b/CharacterArray.st Wed Sep 11 14:06:36 2019 +0200
@@ -417,6 +417,7 @@
"Modified: / 16-01-2018 / 18:59:04 / stefan"
! !
+
!CharacterArray class methodsFor:'cleanup'!
lowSpaceCleanup
@@ -679,6 +680,7 @@
"
! !
+
!CharacterArray class methodsFor:'pattern matching'!
matchEscapeCharacter
@@ -1086,6 +1088,7 @@
^ Unicode32String
! !
+
!CharacterArray class methodsFor:'utilities'!
through:aCharacter in:inStream
@@ -1511,46 +1514,6 @@
^ self lastIndexOfSeparator
!
-lineIndicesDo: aBlock
- "execute aBlock with 3 arguments for each line:
- - start index of line
- - end index of line without line delimiter
- - end index of line including line delimiter(s) CR, LF or CRLF"
-
- | cr lf start sz nextLF nextCR |
-
- start := 1.
- sz := self size.
- Smalltalk isSmalltalkX ifTrue:[
- cr := Character return
- ] ifFalse:[
- cr := Character cr.
- ].
- nextCR := self indexOf: cr startingAt: 1.
- lf := Character lf.
- nextLF := self indexOf: lf startingAt: 1.
- [ start <= sz ] whileTrue: [
- (nextLF == 0 and: [ nextCR == 0 ])
- ifTrue: [ "No more CR, nor LF, the string is over"
- aBlock value: start value: sz value: sz.
- ^self ].
- (nextCR ~= 0 or: [ 0 < nextLF and: [ nextLF < nextCR ] ])
- ifTrue: [ "Found a LF"
- aBlock value: start value: nextLF - 1 value: nextLF.
- start := 1 + nextLF.
- nextLF := self indexOf: lf startingAt: start ]
- ifFalse: [ 1 + nextCR = nextLF
- ifTrue: [ "Found a CR-LF pair"
- aBlock value: start value: nextCR - 1 value: nextLF.
- start := 1 + nextLF.
- nextCR := self indexOf: cr startingAt: start.
- nextLF := self indexOf: lf startingAt: start ]
- ifFalse: [ "Found a CR"
- aBlock value: start value: nextCR - 1 value: nextCR.
- start := 1 + nextCR.
- nextCR := self indexOf: cr startingAt: start ]]]
-!
-
linesDo:aBlock
"evaluate the argument, aBlock for all lines,
up to the end"
@@ -5687,6 +5650,8 @@
! !
+
+
!CharacterArray methodsFor:'matching - glob expressions'!
compoundMatch:aString
@@ -7717,6 +7682,7 @@
"Modified: 17.4.1997 / 12:50:23 / cg"
! !
+
!CharacterArray methodsFor:'special string converting'!
asUnixFilenameString
@@ -7765,12 +7731,15 @@
"
'hello %1' expandPlaceholdersWith:#('world')
- 'hello %1 %abc' expandPlaceholdersWith:#('world')
- 'hello %1 %(abc)' expandPlaceholdersWith:#('world')
+ 'hello %1 %abc' expandNumericPlaceholdersWith:#('world' 'nononono')
+ 'hello %1 %abc' expandPlaceholdersWith:#('world' 'nononono')
+ 'hello %1 %(abc)' expandNumericPlaceholdersWith:#('world' 'nononono')
+ 'hello %1 %(abc)' expandPlaceholdersWith:#('world' 'nononono')
"
"Modified: / 01-07-1997 / 00:53:24 / cg"
"Modified: / 14-07-2018 / 09:23:31 / Claus Gittinger"
+ "Modified (comment): / 09-09-2019 / 13:58:20 / Stefan Vogel"
!
expandPlaceholders
@@ -9706,6 +9675,7 @@
"
! !
+
!CharacterArray methodsFor:'substring searching'!
findRangeOfString:subString
@@ -10291,6 +10261,7 @@
^ aVisitor visitString:self with:aParameter
! !
+
!CharacterArray class methodsFor:'documentation'!
version