-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document why str.to_lowercase and str.to_uppercase return a String #39201
Comments
(With permission from @ubsan & @awygle)
|
tbu-
added a commit
to tbu-/rust
that referenced
this issue
Mar 7, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 8, 2017
…eklabnik Document why `str.to_{lower,upper}case` return `String` Fixes rust-lang#39201.
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 8, 2017
…eklabnik Document why `str.to_{lower,upper}case` return `String` Fixes rust-lang#39201.
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 8, 2017
…eklabnik Document why `str.to_{lower,upper}case` return `String` Fixes rust-lang#39201.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I haven't checked, but I'm 95% certain that they do this because some characters expand into multiple characters when casefolding which wouldn't fit into the buffer of the
str
, so we need a new buffer. Since we don't know the size beforehand, we just return aString
.Probably should link to char.to_lowercase and char.to_uppercase.
The text was updated successfully, but these errors were encountered: