13 Oct
2021
13 Oct
'21
3:14 p.m.
On Wed, Oct 13, 2021, 11:01 AM Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote: Chris Angelico writes:
+1, although it's debatable whether it should be remove suffix or remove all. I'd be happy with either.
If by "remove all" you mean "efefef" - "ef" == "", I think that's a footgun. Similarly for "efabcd" - "ef" == "abcdef" - "ef". Steve Maybe it should be "remove the first one" rather than a suffix. Then for removal of multiple substrings, you could allow the RHS to be a sequence of substrings:
"efaxefef" - "ef" "axefef" "efaxefef" - ["ef", "ax"] "efef" "efaxefef" - ["ef"]*3 "ax"
BTW these are interesting ideas and I'm just exploring the possibilities. Not proposing or agreeing with anything.