字符串移除()的操作|转义数据库默认值-除去多余的() - SqlToDefaultValue
2017-08-19 12:17:26 访问(2042) 赞(0) 踩(0)
/// <summary>
/// 字符串移除()的操作|转义数据库默认值-除去多余的() - SqlToDefaultValue
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public string SqlToDefaultValue(string str)
{
if (str == null)
return "";
while (true)
{
if (str.StartsWith("(") && str.EndsWith(")"))
{
str = str.Substring(1);
str = str.Substring(0, str.Length - 1);
continue;
}
break;
}
return str;
}
上一条:
下一条:
相关评论
发表评论