-
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
good first issueGood for newcomersGood for newcomersmentor availableA mentor is available to help you through the issue.A mentor is available to help you through the issue.
Milestone
Description
It can probably be something like this:
fn ends_with_ignore_ascii_case(path: &str, suffix: &str) -> bool {
if path.len() < suffix.len() {
return false;
}
let start = path.len() - suffix.len();
path.get(start..)
.is_some_and(|tail| tail.eq_ignore_ascii_case(suffix))
}We already have starts_with_ignore_ascii_case, from which that was ported.
Put it in the same module as that function
Also add sufficient test cases similar to the starts_with version.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersmentor availableA mentor is available to help you through the issue.A mentor is available to help you through the issue.