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