Remove the specified suffix from the string if present.
Example:
assert (Strings.trimSuffix ("HelloWorld", "World") == "Hello");
assert (Strings.trimSuffix ("HelloWorld", "Bye") == "HelloWorld");
| s |
the string. |
| suffix |
the suffix to remove. |
|
string with suffix removed, or original if suffix not found. |