In Operators§

See primary documentation in context for infix unicmp.

multi infix:<unicmp>(Str:D \a, Str:D \b --> Order:D)
multi infix:<unicmp>(Pair:D \a, Pair:D \b --> Order:D)
multi infix:<coll>(Pair:D \a, Pair:D \b --> Order:D)

Unlike the cmp operator which sorts according to codepoint, unicmp and coll sort according to how most users would expect, that is, disregarding aspects of the particular character like capitalization.

say 'a' unicmp 'Z'; # OUTPUT: «Less␤»
say 'a' coll 'Z';   # OUTPUT: «Less␤»
say 'a' cmp 'Z';    # OUTPUT: «More␤»

The main difference between coll and unicmp is that the behavior of the former can be changed by the $*COLLATION dynamic variable.

NOTE: These are not yet implemented in the JVM.