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
In strings.md it could be useful to explain the &s[1..2] and &s[2..] syntax for getting a substring slice.
Looking for a way to get a substring reference one is currently faced with the str API documentation which is quite a lot to digest and if one manages to find the unstable slice_chars(...) it says "Use slicing syntax if you want to use byte indices rather than codepoint indices", but what "slicing syntax" means will probably not be clear to someone who is new to Rust and not yet familiar with the Index trait.
The text was updated successfully, but these errors were encountered:
In strings.md it could be useful to explain the
&s[1..2]
and&s[2..]
syntax for getting a substring slice.Looking for a way to get a substring reference one is currently faced with the str API documentation which is quite a lot to digest and if one manages to find the unstable slice_chars(...) it says "Use slicing syntax if you want to use byte indices rather than codepoint indices", but what "slicing syntax" means will probably not be clear to someone who is new to Rust and not yet familiar with the Index trait.
The text was updated successfully, but these errors were encountered: