tuned #replaceFrom:translateBy:
authorClaus Gittinger <cg@exept.de>
Wed, 02 Apr 1997 21:38:42 +0200
changeset 2520 4a7a2f2f0132
parent 2519 07674cea76dd
child 2521 43b9d4fafb35
tuned #replaceFrom:translateBy:
CharArray.st
CharacterArray.st
--- a/CharArray.st	Wed Apr 02 18:13:35 1997 +0200
+++ b/CharArray.st	Wed Apr 02 21:38:42 1997 +0200
@@ -2704,18 +2704,21 @@
     "replace the receivers characters by translations coming from
      an encoding table."
 
-    |sz|
+    |mySize  "{ Class: SmallInteger }" 
+     maxCode "{ Class: SmallInteger }"
+     char 
+     oldCode "{ Class: SmallInteger }"
+     newCode|
 
     self replaceFrom:1 with:aString.
     encodingTable isNil ifTrue:[^ self].
-    sz := encodingTable size.
-
-    1 to:self size do:[:index |
-        |char oldCode newCode|
-
+    maxCode := encodingTable size.
+    mySize := self size.
+
+    1 to:mySize do:[:index |
         char := aString at:index.
         oldCode := char asciiValue.
-        oldCode >= sz ifFalse:[
+        oldCode >= maxCode ifFalse:[
             newCode := encodingTable at:(oldCode + 1).
             newCode ~~ oldCode ifTrue:[
                 self at:index put:(Character value:newCode)
@@ -2724,7 +2727,7 @@
     ].
 
     "Created: 22.2.1996 / 16:07:26 / cg"
-    "Modified: 17.4.1996 / 16:06:30 / cg"
+    "Modified: 2.4.1997 / 21:35:41 / cg"
 ! !
 
 !CharacterArray methodsFor:'padded copying'!
@@ -4244,5 +4247,5 @@
 !CharacterArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/CharArray.st,v 1.104 1997-04-02 16:13:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/CharArray.st,v 1.105 1997-04-02 19:38:42 cg Exp $'
 ! !
--- a/CharacterArray.st	Wed Apr 02 18:13:35 1997 +0200
+++ b/CharacterArray.st	Wed Apr 02 21:38:42 1997 +0200
@@ -2704,18 +2704,21 @@
     "replace the receivers characters by translations coming from
      an encoding table."
 
-    |sz|
+    |mySize  "{ Class: SmallInteger }" 
+     maxCode "{ Class: SmallInteger }"
+     char 
+     oldCode "{ Class: SmallInteger }"
+     newCode|
 
     self replaceFrom:1 with:aString.
     encodingTable isNil ifTrue:[^ self].
-    sz := encodingTable size.
-
-    1 to:self size do:[:index |
-        |char oldCode newCode|
-
+    maxCode := encodingTable size.
+    mySize := self size.
+
+    1 to:mySize do:[:index |
         char := aString at:index.
         oldCode := char asciiValue.
-        oldCode >= sz ifFalse:[
+        oldCode >= maxCode ifFalse:[
             newCode := encodingTable at:(oldCode + 1).
             newCode ~~ oldCode ifTrue:[
                 self at:index put:(Character value:newCode)
@@ -2724,7 +2727,7 @@
     ].
 
     "Created: 22.2.1996 / 16:07:26 / cg"
-    "Modified: 17.4.1996 / 16:06:30 / cg"
+    "Modified: 2.4.1997 / 21:35:41 / cg"
 ! !
 
 !CharacterArray methodsFor:'padded copying'!
@@ -4244,5 +4247,5 @@
 !CharacterArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.104 1997-04-02 16:13:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.105 1997-04-02 19:38:42 cg Exp $'
 ! !