Skip to content

Commit f06df22

Browse files
committed
Clarify "as normal" -> "lexicographically"
1 parent 95eb1e2 commit f06df22

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/doc/style-guide/src/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,13 @@ lexicographical.)
109109

110110
For the purposes of the Rust style, to compare two strings for version-sorting:
111111

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.)
115115
- For both strings, determine the longest sequence of ASCII digits that either
116116
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.)
118119
- Compare the numeric values of the number specified by the sequence of digits.
119120
(Note that an implementation of this algorithm can easily check this without
120121
accumulating copies of the digits or converting to a number: after skipping

0 commit comments

Comments
 (0)