--- a/CharacterArray.st Sat Jul 28 19:25:04 2007 +0200
+++ b/CharacterArray.st Sat Jul 28 20:09:44 2007 +0200
@@ -3813,6 +3813,7 @@
"Modified: 17.4.1997 / 12:50:23 / cg"
! !
+
!CharacterArray methodsFor:'special string converting'!
chopTo:maxLen
@@ -4469,6 +4470,26 @@
"
!
+withoutQuotes
+ "remove quotes ("" and ') from the front and the end of myself"
+
+ |result quote|
+
+ result := self.
+ ((result startsWith:$") or:[(result startsWith:$')]) ifTrue:[
+ quote := result at:1.
+ result := result copyFrom:2.
+ (result endsWith:quote) ifTrue:[
+ result := result copyWithoutLast:1
+ ].
+ ].
+ ^ result
+
+"/ '"hello"' withoutQuotes
+"/ '''hello''' withoutQuotes
+"/ 'hello' withoutQuotes
+!
+
withoutSeparators
"return a copy of myself without leading and trailing whitespace.
(but whiteSpace in-between is preserved)
@@ -5257,7 +5278,7 @@
!CharacterArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.359 2007-05-30 10:39:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.360 2007-07-28 18:09:44 stefan Exp $'
! !
CharacterArray initialize!