StrReplace() should have option to replace from rear of string
Posted: 23 Jul 2018, 11:22
I often have the need to remove a trailing aspect of a string, but not necessarily a unique one. In the compelling instance of this post I have the need to remove the letter E from the rear of a string, but it's not the last character and E is (probably) not unique. With more steps than should really be required I can get it done, BUT I respectfully request that StrReplace() gets an updated option field:
Reverse = 0 for most operations, or 1 if you want to start replacing from the tail end.
Thanks!
Addendum:
Also, an option to skip the first X matches would work.
Code: Select all
ReplacedStr := StrReplace(Haystack, SearchText [, ReplaceText, OutputVarCount, Limit := -1], Reverse := 0)
Thanks!
Addendum:
Also, an option to skip the first X matches would work.