# HG changeset patch # User Claus Gittinger # Date 1551447708 -3600 # Node ID d81aa5b9d246b72a75996863ac015ef5242271f2 # Parent 1fc3c2e0bc92b3e8c31a5866d25c7a7283f7a4c9 #DOCUMENTATION by cg class: CharacterArray category of: #endsWithDigit diff -r 1fc3c2e0bc92 -r d81aa5b9d246 CharacterArray.st --- a/CharacterArray.st Fri Mar 01 12:04:02 2019 +0100 +++ b/CharacterArray.st Fri Mar 01 14:41:48 2019 +0100 @@ -1288,14 +1288,6 @@ " ! -endsWithDigit - "Answer whether the receiver's final character represents a digit. 3/11/96 sw" - - |len| - - ^ (len := self size) ~~ 0 and:[(self at:len) isDigit] -! - findDelimiters:delimiters startingAt:start "Answer the index of the character within the receiver, starting at start, that matches one of the delimiters. @@ -2455,6 +2447,14 @@ "Created: / 29-06-2018 / 11:38:57 / Claus Gittinger" ! +endsWithDigit + "Answer whether the receiver's final character represents a digit. 3/11/96 sw" + + |len| + + ^ (len := self size) ~~ 0 and:[(self at:len) isDigit] +! + hammingDistanceTo:aString "return the hamming distance (the number of characters which are different). In information theory, the Hamming distance between two strings of equal length