I needed the logic over and over again, so I abstracted it into a separate reusable service.
Currently available Actions:
Sanitizes any unwanted characters at the end of the string for removal.
Example: the ?= in "Test.xlsx?="