Read Me - Common Public License V1.0 - Copyright Notice(©)

compare


>>-compare(string-+------+-)-----------------------------------><
                  +-,pad-+

Returns 0 if the argument [string] is identical to the receiving string. Otherwise, returns the position of the first character that does not match. The shorter string is padded on the right with [pad] if necessary. The default [pad] character is a blank.

String class - compare method


"abc"~compare("abc")         ->    0
"abc"~compare("ak")          ->    2
"ab "~compare("ab")          ->    0
"ab "~compare("ab"," ")      ->    0
"ab "~compare("ab","x")      ->    3
"ab-- "~compare("ab","-")    ->    5

Read Me - Common Public License V1.0 - Copyright Notice(©)