leg
ErrorsCollection

leg

Synthesised documentation from language/operators

From language/operators

See Original text in context

multi sub infix:<leg>(Any,   Any)
multi sub infix:<leg>(Str:DStr:D)

String three-way comparator. Short for less, equal or greater?.

Coerces both arguments to Str and then does a lexicographic comparison.

say 'a' leg 'b';       # OUTPUT: «Less␤» 
say 'a' leg 'a';       # OUTPUT: «Same␤» 
say 'b' leg 'a';       # OUTPUT: «More␤»