You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Empty replacement strings are ignored in string replacement functions #16547
When using replaceAfter, replaceAfterLast, replaceBefore, or replaceBeforeLast with an empty replacement string, I expect that matched portion to be replaced with "" hence removing that part of the string. Instead, each function returns the original string unchanged.
If this is indeed a bug I would love to work on this and open a PR?
Related Issues
No I couldn't find any
Questions
Is this expected or is there a design choice behind this ?
And thank you for opening your first issue! We will get back to you shortly. 🏃 💨
If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.
changed the title [-]Empty replacement strings are ignored in string replacement functions[/-][+][BUG]: Empty replacement strings are ignored in string replacement functions[/+]on Nov 8, 2026
Activity
stdlib-bot commentedon Nov 8, 2026
👋 Hi there! 👋
And thank you for opening your first issue! We will get back to you shortly. 🏃 💨
If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members.
[-]Empty replacement strings are ignored in string replacement functions[/-][+][BUG]: Empty replacement strings are ignored in string replacement functions[/+]fix: ensure support for empty replacement strings