]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #40499 - ericfindlay:master, r=steveklabnik
authorCorey Farwell <coreyf@rwell.org>
Fri, 17 Mar 2017 12:49:00 +0000 (08:49 -0400)
committerGitHub <noreply@github.com>
Fri, 17 Mar 2017 12:49:00 +0000 (08:49 -0400)
Corrected very minor documentation detail about Unicode and Japanese

Japanese half-width and full-width romaji characters do have upper and lowercase according Unicode (but other Japanese characters do not). For example,
` assert_eq!('\u{FF21}'.to_lowercase().collect::<String>(),"\u{FF41}");`

r? @steveklabnik

1  2 
src/libstd_unicode/char.rs

index 682eec490bc652ccbd15020834454150e8fbd2ac,def2b7cc36d3dce5d35318957b2f3dcb29944396..b980300126e4b8a2b8b05d9323ecdf3b6dfc063e
@@@ -49,10 -49,10 +49,10 @@@ pub use tables::UNICODE_VERSION
  
  /// Returns an iterator that yields the lowercase equivalent of a `char`.
  ///
 -/// This `struct` is created by the [`to_lowercase()`] method on [`char`]. See
 +/// This `struct` is created by the [`to_lowercase`] method on [`char`]. See
  /// its documentation for more.
  ///
 -/// [`to_lowercase()`]: ../../std/primitive.char.html#method.to_lowercase
 +/// [`to_lowercase`]: ../../std/primitive.char.html#method.to_lowercase
  /// [`char`]: ../../std/primitive.char.html
  #[stable(feature = "rust1", since = "1.0.0")]
  pub struct ToLowercase(CaseMappingIter);
@@@ -70,10 -70,10 +70,10 @@@ impl FusedIterator for ToLowercase {
  
  /// Returns an iterator that yields the uppercase equivalent of a `char`.
  ///
 -/// This `struct` is created by the [`to_uppercase()`] method on [`char`]. See
 +/// This `struct` is created by the [`to_uppercase`] method on [`char`]. See
  /// its documentation for more.
  ///
 -/// [`to_uppercase()`]: ../../std/primitive.char.html#method.to_uppercase
 +/// [`to_uppercase`]: ../../std/primitive.char.html#method.to_uppercase
  /// [`char`]: ../../std/primitive.char.html
  #[stable(feature = "rust1", since = "1.0.0")]
  pub struct ToUppercase(CaseMappingIter);
@@@ -183,7 -183,7 +183,7 @@@ impl char 
      /// * `a-z`
      /// * `A-Z`
      ///
 -    /// For a more comprehensive understanding of 'digit', see [`is_numeric()`][is_numeric].
 +    /// For a more comprehensive understanding of 'digit', see [`is_numeric`][is_numeric].
      ///
      /// [is_numeric]: #method.is_numeric
      ///
      /// Returns the number of 16-bit code units this `char` would need if
      /// encoded in UTF-16.
      ///
 -    /// See the documentation for [`len_utf8()`] for more explanation of this
 +    /// See the documentation for [`len_utf8`] for more explanation of this
      /// concept. This function is a mirror, but for UTF-16 instead of UTF-8.
      ///
 -    /// [`len_utf8()`]: #method.len_utf8
 +    /// [`len_utf8`]: #method.len_utf8
      ///
      /// # Examples
      ///
      /// // Sometimes the result is more than one character:
      /// assert_eq!('İ'.to_lowercase().to_string(), "i\u{307}");
      ///
-     /// // Japanese scripts do not have case, and so:
+     /// // Characters that do not have both uppercase and lowercase
+     /// // convert into themselves.
      /// assert_eq!('山'.to_lowercase().to_string(), "山");
      /// ```
      #[stable(feature = "rust1", since = "1.0.0")]
      /// // Sometimes the result is more than one character:
      /// assert_eq!('ß'.to_uppercase().to_string(), "SS");
      ///
-     /// // Japanese does not have case, and so:
+     /// // Characters that do not have both uppercase and lowercase
+     /// // convert into themselves.
      /// assert_eq!('山'.to_uppercase().to_string(), "山");
      /// ```
      ///