Uh this is a bit of a ramble but we promise there's a point to this. We were going through str's methods and we built the following table from them:
Method family
Returns matched
Returns unmatched
Matches many
strip_*
No
Yes
No
trim_*_matches
No
Yes
Yes
matches
Yes
No
Disjoint
find
Yes
No
No
contains
No
No
N/A
There could be some more useful variants to these. For example, there's currently no trim_*_matches equivalent that returns matched instead of unmatched. Having a *_matches family (i.e. start_matches, end_matches), between trim_*_matches and matches, would fill in that gap.
Thoughts? (Disagreements about how to build the table are welcome ofc :p)