CharacterArray.st
changeset 14420 b388916e6aed
parent 14405 1d0d99a95bba
child 14451 c06e7885b675
--- a/CharacterArray.st	Tue Oct 23 10:23:10 2012 +0200
+++ b/CharacterArray.st	Tue Oct 23 14:59:42 2012 +0200
@@ -3946,7 +3946,7 @@
      This is a q&d hack - not very efficient.
 
      NOTICE: match-meta character interpretation is like in unix-matching (glob),
-	     NOT the ST-80 meaning.
+             NOT the ST-80 meaning.
      NOTICE: this is GLOB, which is different from regex matching (see matchesRegex:)
      NOTICE: the argument is the match pattern"
 
@@ -3961,40 +3961,41 @@
 
     realMatchString := matchString.
     (realMatchString endsWith:$*) ifFalse:[
-	realMatchString := realMatchString , '*'.
-	matchSize := matchSize + 1
+        realMatchString := realMatchString , '*'.
+        matchSize := matchSize + 1
     ].
 
     mySize := self size.
     firstChar := realMatchString at:1.
     firstChar == self class matchEscapeCharacter ifTrue:[
-	firstChar := realMatchString at:2.
+        firstChar := realMatchString at:2.
     ].
 
     firstChar asString includesMatchCharacters ifTrue:[
-	index to:mySize do:[:col |
-	    (realMatchString match:self from:col to:mySize ignoreCase:ignoreCase)
-	    ifTrue:[^ col]
-	].
-	^ exceptionBlock value.
+        index to:mySize do:[:col |
+            (realMatchString match:self from:col to:mySize ignoreCase:ignoreCase)
+            ifTrue:[^ col]
+        ].
+        ^ exceptionBlock value.
     ].
 
     lcChar := firstChar asLowercase.
     ucChar := firstChar asUppercase.
     (ignoreCase and:[ lcChar ~= ucChar]) ifTrue:[
-	firstSet := Array with:ucChar with:lcChar.
-	startIndex := self indexOfAny:firstSet startingAt:index.
+        firstSet := Array with:ucChar with:lcChar.
+        startIndex := self indexOfAny:firstSet startingAt:index.
     ] ifFalse:[
-	startIndex := self indexOf:firstChar startingAt:index.
+        startIndex := self indexOf:firstChar startingAt:index.
     ].
     [startIndex == 0] whileFalse:[
-	(realMatchString match:self from:startIndex to:mySize ignoreCase:ignoreCase)
-	ifTrue:[^ startIndex].
-	firstSet notNil ifTrue:[
-	    startIndex := self indexOfAny:firstSet startingAt:(startIndex + 1).
-	] ifFalse:[
-	    startIndex := self indexOf:firstChar startingAt:(startIndex + 1).
-	].
+        (realMatchString match:self from:startIndex to:mySize ignoreCase:ignoreCase)
+        ifTrue:[^ startIndex].
+
+        firstSet notNil ifTrue:[
+            startIndex := self indexOfAny:firstSet startingAt:(startIndex + 1).
+        ] ifFalse:[
+            startIndex := self indexOf:firstChar startingAt:(startIndex + 1).
+        ].
     ].
     ^ exceptionBlock value
 
@@ -6099,11 +6100,11 @@
 !CharacterArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.476 2012-10-20 19:11:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.477 2012-10-23 12:59:42 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.476 2012-10-20 19:11:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.477 2012-10-23 12:59:42 cg Exp $'
 ! !
 
 CharacterArray initialize!