-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specialized string predicates #25
Comments
|
Some of these take |
RE We either hard code versions of this for each concrete type we care about or implement an empty-check trait and include implementations for the standard lib. |
Including - starts_with - ends_with - contains Unfortunately, we can't take pattern, so we're limited to `Into<String>`. The only thing missing to complete assert-rs#25 is to add a `count` to `contains`. This would either be a number or a numeric predicate.
This sets a required count for number of matches. It could be of value to make this accept a predicate. In that case, for API convinience, we should probably have a `ToCountPredicate` that is attached to both `Predicate<usize>` and `usize`. This would allow things like `contains("Two").count(predicate::in_iter([3, 4])`. Fixes assert-rs#25
The text was updated successfully, but these errors were encountered: