File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -109,12 +109,13 @@ lexicographical.)
109
109
110
110
For the purposes of the Rust style, to compare two strings for version-sorting:
111
111
112
- - Compare the strings by (Unicode) character as normal , finding the index of
113
- the first differing character. (If the two strings do not have the same
114
- length, this may be the end of the shorter string.)
112
+ - Compare the strings by (Unicode) character lexicographically , finding the
113
+ index of the first differing character. (If the two strings do not have the
114
+ same length, this may be the end of the shorter string.)
115
115
- For both strings, determine the longest sequence of ASCII digits that either
116
116
contains or ends at that index. (If either string doesn't have such a
117
- sequence of ASCII digits, fall back to comparing the strings as normal.)
117
+ sequence of ASCII digits, fall back to comparing the strings
118
+ lexicographically.)
118
119
- Compare the numeric values of the number specified by the sequence of digits.
119
120
(Note that an implementation of this algorithm can easily check this without
120
121
accumulating copies of the digits or converting to a number: after skipping
You can’t perform that action at this time.
0 commit comments