-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add character start index to function arguments #8
Comments
Cool, thanks @pejrak. This is a good reference for anyone trying to do the same. I'm going to close this out but if there's additional action you'd like to take feel free to reopen. |
Alright, this is probably isolated to my case/scenario. Please consider reviewing/adding if there is anyone else needing that. Thanks for the package and reply. |
Did you want to incorporate this into the library? I didn't know because this is an Issue instead of a Pull Request. Looking at the official String.prototype.replace docs it does seem that the official function is called with addition args. I would certainly be in support of mirroring that API since it's consistent with JS. Maybe you could make a PR with your changes and we can discuss there? |
Ian, I had other commitments last week, but I just added a pull request to my fork. Let me see if I can write a test on this. |
I suppose this is the offset from String.prototype.replace docs Test added. |
Added character start to fn call arguments per issue #8
Hi, I your package helped me in a project where I wanted to wrap fields in a text. Fields were used to replace the matched strings with something else. However, I was missing the information about index of the match start character within the text. I will reference my solution.
The text was updated successfully, but these errors were encountered: