#region 移除字符串末尾指定字符
///
/// 移除字符串末尾指定字符
///
///需要移除的字符串
///指定字符
/// 移除后的字符串
public static string RemoveLastChar(string str, string value)
{
int _finded = str.LastIndexOf(value);
if (_finded != -1)
{
return str.Substring(0, _finded);
}
return str;
}
#endregion
以上就是c# 移除字符串末尾指定字符的内容,更多相关内容请关注php中文网(www.php.cn)!










