Want to process a set of strings, and trim some ending "myEnding" from the end of each string if it exists.
What is the simplest way to do it? I know that everything is possible with regexp, but thus seems to be a simple task, and I wonder whether a simpler tool for this exists.
Thanks
Gidi
s($str)->replaceSuffix('myEnding')helpful, as found in this standalone library.