You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frewsxcv opened this issue
Sep 7, 2017
· 5 comments
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-lowLow priority
The text was updated successfully, but these errors were encountered:
frewsxcv
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
P-low
Low priority
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
labels
Sep 7, 2017
I had a thought about how to implement this better. The current example uses the string 🗻∈🌏 where the characters have a variable byte length. This was a source of confusing when I first looked at the example (its not super obvious that 🗻 is 4 bytes).
I was thinking of changing the string to something more uniform like hello which is 1 byte per char and then applying make_ascii_uppercase(). This could also be applied to other examples.
I was thinking of changing the string to something more uniform like hello which is 1 byte per char and then applying make_ascii_uppercase(). This could also be applied to other examples.
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-lowLow priority
https://doc.rust-lang.org/nightly/std/primitive.str.html#method.get_mut
The doc example should demonstrate the effects of mutating the resulting string slice.
The easiest way I've found to demonstrate mutability with doc examples for
str
is to useAsciiExt
: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at_mutThe text was updated successfully, but these errors were encountered: