Skip to content
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

Clarify behavior of trim_end_match in README #2574

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Conversation

xavdid
Copy link
Contributor

@xavdid xavdid commented Jan 14, 2025

I was super confused about why my regex wasn't working with trim_end_match and it wasn't until I found #1658 that I figured out why.

I think calling the second parameter pattern implies that it's a regex pattern when it's not. I changed it to substr to imply it's just a regular string (it is), we could also add additional docs to that effect.

fixes #1983

@casey casey enabled auto-merge (squash) January 15, 2025 00:33
@casey
Copy link
Owner

casey commented Jan 15, 2025

Good idea, that's much better. I changed substr to substring.

@casey casey merged commit bea1f6b into casey:master Jan 15, 2025
5 checks passed
@xavdid xavdid deleted the readme-fixes branch January 15, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clarify the matching pat in replacement documentation
2 participants