Method TrimEnd
TrimEnd(string, string)
Removes all occurrences of a specified substring from the end of the target string.
public static string TrimEnd(this string target, string trimString)
Parameters
Returns
- string
The string that remains after all occurrences of the
trimString
string are removed from the end of the target string. If no string can be trimmed from the target string, the method returns the target string unchanged.