assert(smallerStringFirstCmp("aa", "bb") < 0); assert(smallerStringFirstCmp("aa", "aa") == 0); assert(smallerStringFirstCmp("aaa", "aa") > 0); static assert(smallerStringFirstCmp("aa", "bb") < 0); static assert(smallerStringFirstCmp("aa", "aa") == 0); static assert(smallerStringFirstCmp("aaa", "aa") > 0);
Compares strings by length and then lexicographically.