We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents eedbfc0 + 1fd64cf commit f58e80fCopy full SHA for f58e80f
src/libcore/char/methods.rs
@@ -337,16 +337,16 @@ impl char {
337
/// ```
338
/// // as chars
339
/// let eastern = '東';
340
- /// let capitol = '京';
+ /// let capital = '京';
341
///
342
/// // both can be represented as three bytes
343
/// assert_eq!(3, eastern.len_utf8());
344
- /// assert_eq!(3, capitol.len_utf8());
+ /// assert_eq!(3, capital.len_utf8());
345
346
/// // as a &str, these two are encoded in UTF-8
347
/// let tokyo = "東京";
348
349
- /// let len = eastern.len_utf8() + capitol.len_utf8();
+ /// let len = eastern.len_utf8() + capital.len_utf8();
350
351
/// // we can see that they take six bytes total...
352
/// assert_eq!(6, tokyo.len());
0 commit comments