Skip to content
Permalink
Browse files

Updated comments with improved executable examples.

  • Loading branch information
JP-WWU committed Oct 24, 2019
1 parent 55974c3 commit 576633984c7e55d99151f71d288439b3c6683740
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/Collections-Strings/String.class.st
@@ -469,13 +469,13 @@ String >> >= aString [
{ #category : #comparing }
String >> alike: aString [
"Answer some indication of how alike the receiver is to the argument, 0 is no match, twice aString size is best score (but see example with 7). Case is ignored. This method is used to help find mistyped variable names in methods."
"('abc' alike: 'abc') >>> 7.
('abc' alike: '1') >>> 0.
('abc' alike: 'ABC') >>> 7.
('abc' alike: 'ab') >>> 3.
('abc' alike: 'bbb') >>> 1.
('abc' alike: 'xyz') >>> 1."
"Answer some indication of how alike the receiver is to the argument, 0 is no match, twice aString size is best score (but see example with 7). Case is ignored. This method is used to help find mistyped variable names in methods.
('abc' alike: 'abc') >>> 7.
('action' alike: 'actions') >>> 7.
('action' alike: 'caption') >>> 5.
('action' alike: 'name') >>> 0.
"
| i j k minSize bonus |
minSize := (j := self size) min: (k := aString size).

0 comments on commit 5766339

Please sign in to comment.
You can’t perform that action at this time.