--- a/PhoneticStringUtilities.st Sun Oct 30 16:29:38 2016 +0100
+++ b/PhoneticStringUtilities.st Wed Nov 02 14:50:01 2016 +0100
@@ -1230,11 +1230,11 @@
k := key copy.
"2. Transcode initial strings: MAC => MC PF => F"
- (k copyFrom:1 to:3) = 'MAC' ifTrue:[
- k := 'MC' , (k copyFrom:4 to:k size)
+ (k startsWith:'MAC') ifTrue:[
+ k := 'MC' , (k copyFrom:4)
].
- (k copyFrom:1 to:2) = 'PF' ifTrue:[
- k := 'F' , (k copyFrom:3 to:k size)
+ (k startsWith:'PF') ifTrue:[
+ k := 'F' , (k copyFrom:3)
].
^ k
!
@@ -2792,7 +2792,7 @@
].
((((currentIndex = self inputKey size) and: [(self keyAt: currentIndex - 1) isVowel])
or: [#('EWSKI' 'EWSKY' 'OWSKI' 'OWSKY') includes: (self inputKey copyFrom: ((currentIndex - 1) max: 1) to: (currentIndex + 3 min: self inputKey size))])
- or: [(self inputKey copyFrom: 1 to: 3) = 'SCH'])
+ or: [self inputKey startsWith:'SCH'])
ifTrue: [
self addPrimaryTranslation: '';
addSecondaryTranslation: 'F'.