compareNeq

compareNeq(rhs:         String;
           bIgnoreCase: Boolean;
           bUseLocale:  Boolean;
           locale:      Locale): Boolean;

The compareNeq method of the String primitive type returns true if the receiver is not equal to the value of the rhs parameter; otherwise, it returns false.

Parameters enable you to make the comparison case-sensitive or case-insensitive, and to use the sort order associated with a locale or the strict binary sort order. (These are the same comparison options that you can specify on dictionary keys.)

The relational binary comparison operator (<>), documented in Chapter 1 of the JADE Developer’s Reference, uses a strict binary value comparison.

If the value of the bIgnoreCase parameter is false:

If the value of the bIgnoreCase parameter is true:

The code fragment in the following example shows the use of the compareNeq method.

write "Alice".compareNeq("alice", true, false, null);   // Outputs false
write "Alice".compareNeq("alice", false, false, null);  // Outputs true