Skip to content

Commit

Permalink
Rollup merge of #62239 - lcolaholicl:lcolaholicl-patch-1, r=kennytm
Browse files Browse the repository at this point in the history
Fix a typo

The definition of 京 seems to be capital, but not capitol.
[reference](https://en.wiktionary.org/wiki/%E4%BA%AC#Etymology_1)
[another reference](https://jisho.org/word/%E4%BA%AC)
  • Loading branch information
Centril authored Jun 30, 2019
2 parents 2b313b1 + 1fd64cf commit 690f9e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcore/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,16 @@ impl char {
/// ```
/// // as chars
/// let eastern = '東';
/// let capitol = '京';
/// let capital = '京';
///
/// // both can be represented as three bytes
/// assert_eq!(3, eastern.len_utf8());
/// assert_eq!(3, capitol.len_utf8());
/// assert_eq!(3, capital.len_utf8());
///
/// // as a &str, these two are encoded in UTF-8
/// let tokyo = "東京";
///
/// let len = eastern.len_utf8() + capitol.len_utf8();
/// let len = eastern.len_utf8() + capital.len_utf8();
///
/// // we can see that they take six bytes total...
/// assert_eq!(6, tokyo.len());
Expand Down

0 comments on commit 690f9e4

Please sign in to comment.