MrPowers / quinn

pyspark methods to enhance developer productivity 📣 👯 🎉
https://mrpowers.github.io/quinn/
Apache License 2.0
597 stars 93 forks source link

Fix surround substring to surround all substrings #212

Closed mrjsj closed 4 months ago

mrjsj commented 4 months ago

Proposed changes

Fixes #209

Types of changes

What types of changes does your code introduce to quinn? Put an x in the boxes that apply

Further comments

I changed the input.find-method to simply use input.replace in order to replace all occurrences of the keyword. It will also replace substrings inside words, which I'm not sure is intentional (see 3rd unit test). Should the substring only be surrounded if there are no alphabetical characters, or maybe no alphanumerical characters around it? I.e.