CharacterArray.st
changeset 22327 68bf46e35027
parent 22325 e9fba9f05c31
child 22344 1b2892ef31d6
equal deleted inserted replaced
22326:3326c18b05a5 22327:68bf46e35027
  2416 
  2416 
  2417     "Modified: / 25-10-2017 / 11:25:08 / stefan"
  2417     "Modified: / 25-10-2017 / 11:25:08 / stefan"
  2418 !
  2418 !
  2419 
  2419 
  2420 compareCaselessWith:aString
  2420 compareCaselessWith:aString
  2421     "Compare the receiver against the argument, ignoreing case.
  2421     "Compare the receiver against the argument, ignoring case.
  2422      Return 1 if the receiver is greater, 0 if equal and -1 if less than the argument.
  2422      Return 1 if the receiver is greater, 0 if equal and -1 if less than the argument.
  2423 
  2423 
  2424      This comparison is based on the elements ascii code -
  2424      This comparison is based on the elements ascii code -
  2425      i.e. national characters are NOT treated specially.
  2425      i.e. national characters are NOT treated specially.
  2426      'foo' compareWith: 'Foo' will return 0"
  2426      'foo' compareWith: 'Foo' will return 0"
  2442     ].
  2442     ].
  2443     mySize > otherSize ifTrue:[^ 1].
  2443     mySize > otherSize ifTrue:[^ 1].
  2444     mySize < otherSize ifTrue:[^ -1].
  2444     mySize < otherSize ifTrue:[^ -1].
  2445     ^ 0
  2445     ^ 0
  2446 
  2446 
  2447     "Modified: 22.4.1996 / 15:56:07 / cg"
  2447     "Modified: / 22-04-1996 / 15:56:07 / cg"
       
  2448     "Modified (comment): / 26-10-2017 / 16:01:01 / mawalch"
  2448 !
  2449 !
  2449 
  2450 
  2450 compareCollatingWith:aString
  2451 compareCollatingWith:aString
  2451     "Compare the receiver with the argument and return 1 if the receiver is
  2452     "Compare the receiver with the argument and return 1 if the receiver is
  2452      greater, 0 if equal and -1 if less than the argument in a sorted list.
  2453      greater, 0 if equal and -1 if less than the argument in a sorted list.