Skip to content

Commit f2886e8

Browse files
author
Ariel Ben-Yehuda
authored
Rollup merge of #40335 - tbu-:pr_doc_str_to_somecase, r=steveklabnik
Document why `str.to_{lower,upper}case` return `String` Fixes #39201.
2 parents aea8010 + f3a2f90 commit f2886e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libcollections/str.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,10 @@ impl str {
16461646
/// 'Lowercase' is defined according to the terms of the Unicode Derived Core Property
16471647
/// `Lowercase`.
16481648
///
1649+
/// Since some characters can expand into multiple characters when changing
1650+
/// the case, this function returns a [`String`] instead of modifying the
1651+
/// parameter in-place.
1652+
///
16491653
/// [`String`]: string/struct.String.html
16501654
///
16511655
/// # Examples
@@ -1718,6 +1722,10 @@ impl str {
17181722
/// 'Uppercase' is defined according to the terms of the Unicode Derived Core Property
17191723
/// `Uppercase`.
17201724
///
1725+
/// Since some characters can expand into multiple characters when changing
1726+
/// the case, this function returns a [`String`] instead of modifying the
1727+
/// parameter in-place.
1728+
///
17211729
/// [`String`]: string/struct.String.html
17221730
///
17231731
/// # Examples

0 commit comments

Comments
 (0)