@@ -66,6 +66,11 @@ pub trait AsciiExt {
66
66
/// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
67
67
/// but non-ASCII letters are unchanged.
68
68
///
69
+ /// To uppercase the string in-place, use [`make_ascii_uppercase`].
70
+ ///
71
+ /// To uppercase ASCII characters in addition to non-ASCII characters, use
72
+ /// [`str::to_uppercase`].
73
+ ///
69
74
/// # Examples
70
75
///
71
76
/// ```
@@ -77,6 +82,9 @@ pub trait AsciiExt {
77
82
/// assert_eq!('A', ascii.to_ascii_uppercase());
78
83
/// assert_eq!('❤', utf8.to_ascii_uppercase());
79
84
/// ```
85
+ ///
86
+ /// [`make_ascii_uppercase`]: #tymethod.make_ascii_uppercase
87
+ /// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
80
88
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
81
89
fn to_ascii_uppercase ( & self ) -> Self :: Owned ;
82
90
@@ -85,6 +93,11 @@ pub trait AsciiExt {
85
93
/// ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
86
94
/// but non-ASCII letters are unchanged.
87
95
///
96
+ /// To lowercase the string in-place, use [`make_ascii_lowercase`].
97
+ ///
98
+ /// To lowercase ASCII characters in addition to non-ASCII characters, use
99
+ /// [`str::to_lowercase`].
100
+ ///
88
101
/// # Examples
89
102
///
90
103
/// ```
@@ -96,6 +109,9 @@ pub trait AsciiExt {
96
109
/// assert_eq!('a', ascii.to_ascii_lowercase());
97
110
/// assert_eq!('❤', utf8.to_ascii_lowercase());
98
111
/// ```
112
+ ///
113
+ /// [`make_ascii_lowercase`]: #tymethod.make_ascii_lowercase
114
+ /// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
99
115
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
100
116
fn to_ascii_lowercase ( & self ) -> Self :: Owned ;
101
117
@@ -123,7 +139,11 @@ pub trait AsciiExt {
123
139
124
140
/// Converts this type to its ASCII upper case equivalent in-place.
125
141
///
126
- /// See `to_ascii_uppercase` for more information.
142
+ /// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
143
+ /// but non-ASCII letters are unchanged.
144
+ ///
145
+ /// To return a new uppercased string without modifying the existing one, use
146
+ /// [`to_ascii_uppercase`].
127
147
///
128
148
/// # Examples
129
149
///
@@ -136,12 +156,18 @@ pub trait AsciiExt {
136
156
///
137
157
/// assert_eq!('A', ascii);
138
158
/// ```
159
+ ///
160
+ /// [`to_ascii_uppercase`]: #tymethod.to_ascii_uppercase
139
161
#[ stable( feature = "ascii" , since = "1.9.0" ) ]
140
162
fn make_ascii_uppercase ( & mut self ) ;
141
163
142
164
/// Converts this type to its ASCII lower case equivalent in-place.
143
165
///
144
- /// See `to_ascii_lowercase` for more information.
166
+ /// ASCII letters 'A' to 'Z' are mapped to 'a' to 'z',
167
+ /// but non-ASCII letters are unchanged.
168
+ ///
169
+ /// To return a new lowercased string without modifying the existing one, use
170
+ /// [`to_ascii_lowercase`].
145
171
///
146
172
/// # Examples
147
173
///
@@ -154,6 +180,8 @@ pub trait AsciiExt {
154
180
///
155
181
/// assert_eq!('a', ascii);
156
182
/// ```
183
+ ///
184
+ /// [`to_ascii_lowercase`]: #tymethod.to_ascii_lowercase
157
185
#[ stable( feature = "ascii" , since = "1.9.0" ) ]
158
186
fn make_ascii_lowercase ( & mut self ) ;
159
187
}
0 commit comments