Contents | Index | < Browse | Browse >
COMPARE(<string1>,<string2>,[<padchar>])
      returns a number

The result is 0 if both strings are identical. If they aren't, the number
returned is the position of the first character where the strings differ.
The shorter string is padded with <padchar> before the comparison.

The default pad character is a blank.

   Examples:

         say compare('The first','The only');      >>> 5
         say compare('worldwide','wordwide');      >>> 4
         say compare('foo','f');                   >>> 2
         say compare('foo','f','o');               >>> 0

   Also see 
            

Next: FIND() | Prev: ABBREV() | Contents: Comparison functions