I've created an extension method for string
public static string EnsureEndsWith(this string str,string sEndValue,bool ignoreCase=true)
{
if (!str.EndsWith(sEndValue, ignoreCase, CultureInfo.InvariantCulture))
{
str = str + sEndValue;
}
return str;
}
By some reason content of the post is not shown!?