--- a/CharacterArray.st Mon Oct 04 17:12:14 1999 +0200
+++ b/CharacterArray.st Mon Oct 04 17:34:19 1999 +0200
@@ -4374,13 +4374,14 @@
in the new string 'hello world; how is this'.
As an extension, the argument may also be a dictionary, providing
values for character keys.
- In this case, %a .. %z are also allowed.
+ In this case, %a .. %z and %(...) are also allowed.
(%1..%9 require a numeric key in the dictionary, however)
To get a '%' character, use a '%%'-escape.
See also bindWith:... for VisualAge compatibility."
- |expandedString next v
+ |expandedString next v key
idx "{ SmallInteger }"
+ idx2 "{ SmallInteger }"
start "{ SmallInteger }"
stop "{ SmallInteger }"|
@@ -4401,7 +4402,14 @@
(next between:$1 and:$9) ifTrue:[
v := argArrayOrDictionary at:(next digitValue)
] ifFalse:[
- v := argArrayOrDictionary at:next
+ next == $( ifTrue:[
+ idx2 := self indexOf:$) startingAt:idx+2.
+ key := self copyFrom:idx+2 to:idx2-1.
+ idx := idx2 - 1.
+ v := argArrayOrDictionary at:key asSymbol
+ ] ifFalse:[
+ v := argArrayOrDictionary at:next
+ ]
].
expandedString := expandedString , v printString
].
@@ -5391,6 +5399,6 @@
!CharacterArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.167 1999-09-04 18:20:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.168 1999-10-04 15:34:19 cg Exp $'
! !
CharacterArray initialize!