#REFACTORING by cg
class: CharacterArray
use isLetterOrUnderline/isLetterrDigitOrUnderline
changed:
#expandPlaceholders:with:ignoreNumericEscapes:requireParentheses:on:
#isKeywordSelector
#isUnarySelector
--- a/CharacterArray.st Wed Jun 05 17:09:46 2019 +0200
+++ b/CharacterArray.st Wed Jun 05 17:10:09 2019 +0200
@@ -7014,7 +7014,7 @@
char == $: ifTrue:[
state := #gotColon.
] ifFalse:[
- (char isLetterOrDigit or:[char == $_]) ifFalse:[^ false].
+ (char isLetterOrDigitOrUnderline) ifFalse:[^ false].
].
].
].
@@ -7037,6 +7037,7 @@
"
"Modified (comment): / 30-04-2016 / 18:20:14 / cg"
+ "Modified: / 05-06-2019 / 17:05:53 / Claus Gittinger"
!
isLowercaseFirst
@@ -7591,7 +7592,7 @@
requireParentheses ifTrue:[
key := next.
] ifFalse:[
- idx2 := self findFirst:[:ch | (ch isLetterOrDigit or:[ch == $_]) not] startingAt:idx+2.
+ idx2 := self findFirst:[:ch | (ch isLetterOrDigitOrUnderline) not] startingAt:idx+2.
idx2 == 0 ifTrue:[idx2 := self size + 1].
key := self copyFrom:idx+1 to:idx2-1.
idx := idx2 - 2.
@@ -7686,6 +7687,7 @@
"
"Created: / 14-01-2019 / 17:43:03 / Claus Gittinger"
+ "Modified: / 05-06-2019 / 17:05:47 / Claus Gittinger"
!
expandPlaceholders:escapeCharacter with:argArrayOrDictionary on:aStream
@@ -9237,9 +9239,10 @@
"Answer true if the receiver contains only chars in an ANSI unary method selector, false otherwise."
^ (self first isLetterOrUnderline)
- and:[ self conform: [ :chr | chr isLetterOrDigit or:[chr == $_] ]]
+ and:[ self conform: [ :chr | chr isLetterOrDigitOrUnderline ]]
"Modified: / 13-09-2006 / 11:35:15 / cg"
+ "Modified: / 05-06-2019 / 17:05:59 / Claus Gittinger"
!
isUnicode16String