日期:2014-05-20 浏览次数:20914 次
/// <summary>
/// 清除样式
/// </summary>
/// <param name="value">所要截取的字符串</param>
/// <param name="cleanEormat">是否清除格式</param>
/// <returns></returns>
public static string CleanFormat(string value, bool cleanFormat)
{
string m_sOutString = string.Empty;
if (value == null
------解决方案--------------------
value.Trim() == "")
{
return "";
}
foreach (char m_cChar in cleanFormat ? Regex.Replace(value, "<[^>]+>", "").ToString() : value)
{
m_sOutString += m_cChar;
}
return m_sOutString;
}