Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels