Splitting variants of str::starts_with and ends_with
Open
Nobody has claimed this yet.
T-libs
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
More often than not, when using starts_with or ends_with I actually want to do something with the remaining slice and have to split it out manually, e.g.:
if s.starts_with(prefix) {
let part = &s[prefix.len()..];
// ...
}
it would be more convenient to just do
if let Some(part) = s.starts_split(prefix) {
// ...
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the starts_with and ends_with examples in this issue; no source file, test, or entry point is named. Work out the proposed split-method behavior and API shape, then consider the issue complete when the design is settled and documented for implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100