class: CharacterArray cvs_MAIN
authorClaus Gittinger <cg@exept.de>
Sun, 23 Feb 2020 16:25:57 +0100
branchcvs_MAIN
changeset 4000 76dc79cc42a2
parent 3999 d7c199709abd
class: CharacterArray comment/format in: #unquote changed: #asDottedJavaClassName #asSTXInternalJavaClassName #asSlashedJavaClassName #unquote: #withoutQuotes
extensions.st
--- a/extensions.st	Sun Feb 23 14:10:52 2020 +0100
+++ b/extensions.st	Sun Feb 23 16:25:57 2020 +0100
@@ -309,15 +309,15 @@
     | nm |
     nm := self asJavaComponentClassName.
     (nm first == $L) ifTrue: [
-	nm := nm copyFrom: 2 to: nm size - 1.
-	(nm includes: $/) ifTrue: [
-	    "/ No need to do another copt here!!
-	    nm replaceAll: $/ with: $.
-	].
+        nm := nm copyButFirstAndLast.
+        (nm includes: $/) ifTrue: [
+            "/ No need to do another copt here!!
+            nm replaceAll: $/ with: $.
+        ].
     ] ifFalse:[
-	(nm includes: $/) ifTrue: [
-	    nm := nm copyReplaceAll: $/ with: $.
-	].
+        (nm includes: $/) ifTrue: [
+            nm := nm copyReplaceAll: $/ with: $.
+        ].
     ].
     ^ nm.
 
@@ -358,10 +358,10 @@
 
     internalName := self asJavaComponentClassName.
     (internalName startsWith: $L) ifTrue: [
-	internalName := internalName copyFrom: 2 to: internalName size - 1
+        internalName := internalName copyButFirstAndLast
     ].
     (internalName includes: $.) ifTrue: [
-	internalName := internalName asString copyReplaceAll: $. with: $/
+        internalName := internalName asString copyReplaceAll: $. with: $/
     ].
     ^internalName.
 ! !
@@ -373,15 +373,15 @@
     | internalName |
     internalName := self asJavaComponentClassName.
     (internalName first == $L) ifTrue: [
-	internalName := internalName copyFrom: 2 to: internalName size - 1.
-	"/ No need to do another copy here
-	(internalName includes: $.) ifTrue: [
-	    internalName replaceAll: $. with: $/
-	].
+        internalName := internalName copyButFirstAndLast.
+        "/ No need to do another copy here
+        (internalName includes: $.) ifTrue: [
+            internalName replaceAll: $. with: $/
+        ].
     ] ifFalse:[
-	(internalName includes: $.) ifTrue: [
-	    internalName := internalName copyReplaceAll: $. with: $/
-	].
+        (internalName includes: $.) ifTrue: [
+            internalName := internalName copyReplaceAll: $. with: $/
+        ].
     ].
     ^ internalName.