1
With a lexicographic order, a string is always sorted before its prefix. The tilde character allows a deviation from that: foo~bar is always sorted before foo as well as before any version that begins with foo followed by a character other than ~.