public static string SafeTrimEnd(this string cad, params char[] trimChars) => cad?.TrimEnd();
Example #2
0
 /// <summary>
 ///     Trims the end of a string safely.  If the string is null, null is returned.
 /// </summary>
 public static string TrimEndSafely(this string instance)
 {
     return instance?.TrimEnd();
 }