CharacterArray.st
changeset 17024 f0ef2620b98b
parent 17021 c7ac4c24c541
child 17043 4cd789620782
--- a/CharacterArray.st	Tue Nov 11 11:23:19 2014 +0100
+++ b/CharacterArray.st	Tue Nov 11 11:23:47 2014 +0100
@@ -283,6 +283,7 @@
     "Created: 3.8.1997 / 18:16:40 / cg"
 ! !
 
+
 !CharacterArray class methodsFor:'cleanup'!
 
 lowSpaceCleanup
@@ -326,6 +327,7 @@
     "
 ! !
 
+
 !CharacterArray class methodsFor:'pattern matching'!
 
 matchEscapeCharacter
@@ -723,6 +725,7 @@
     ^ self == CharacterArray
 ! !
 
+
 !CharacterArray methodsFor:'Compatibility-ANSI'!
 
 addLineDelimiters
@@ -1624,22 +1627,6 @@
 
 !CharacterArray methodsFor:'JavaScript support'!
 
-quote
-    "add double quotes around the receiver (unless already quoted).
-     This is the JavaSccript standard quote function."
-
-    ((self first == $") and:[self last == $"]) ifFalse:[
-        ^ '"',self,'"'
-    ].
-    ^ self
-
-    "
-     'hello' quote
-
-     JavaScriptParser evaluate:'''hello''.quote.unquote' 
-    "
-!
-
 unquote
     "removes double quotes from the receiver.
      This is the JavaSccript standard unquote function."
@@ -4283,6 +4270,8 @@
 ! !
 
 
+
+
 !CharacterArray methodsFor:'matching - glob expressions'!
 
 compoundMatch:aString
@@ -4966,6 +4955,7 @@
 ! !
 
 
+
 !CharacterArray methodsFor:'padded copying'!
 
 centerPaddedTo:newSize
@@ -6512,6 +6502,8 @@
 
     |firstChar|
 
+    self isEmpty ifTrue:[^ self].
+
     firstChar := self first.
     ((firstChar == $") or:[firstChar == $']) ifFalse:[^ self].
 
@@ -6583,6 +6575,7 @@
     "
 ! !
 
+
 !CharacterArray methodsFor:'substring searching'!
 
 findRangeOfString:subString
@@ -7166,14 +7159,15 @@
     ^ aVisitor visitString:self with:aParameter
 ! !
 
+
 !CharacterArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.548 2014-11-10 17:18:01 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.549 2014-11-11 10:23:47 ca Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.548 2014-11-10 17:18:01 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.549 2014-11-11 10:23:47 ca Exp $'
 ! !