17 lines
638 B
Plaintext
17 lines
638 B
Plaintext
Method "string comparisons_,_" is
|
|
[
|
|
a : string,
|
|
b : string
|
|
|
|
|
Print: "a & b are equal? " ++ “a = b”;
|
|
Print: "a & b are not equal? " ++ “a ≠ b”;
|
|
// Inequalities compare by code point
|
|
Print: "a is lexically before b? " ++ “a < b”;
|
|
Print: "a is lexically after b? " ++ “a > b”;
|
|
// Supports non-strict inequalities
|
|
Print: "a is not lexically before b? " ++ “a ≥ b”;
|
|
Print: "a is not lexically after b? " ++ “a ≤ b”;
|
|
// Case-insensitive comparison requires a manual case conversion
|
|
Print: "a & b are equal case-insensitively?" ++ “lowercase a = lowercase b”;
|
|
];
|