Answers for "c# trimend substring"

C#
0

c# trimend substring

public static string TrimEnd(this string source, string value)
{
    if (!source.EndsWith(value))
        return source;

    return source.Remove(source.LastIndexOf(value));
}
Posted by: Guest on May-05-2021

C# Answers by Framework

Browse Popular Code Answers by Language