Rollup merge of #62239 - lcolaholicl:lcolaholicl-patch-1, r=kennytm
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)
This commit is contained in:
commit
690f9e422e
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user