时间有0;00;00 的 隐藏

/// <summary>
/// 时间有0;00;00 的 隐藏
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public static string CutString(string str)
{
string s = "0:00:00";
try
{
if (str.Contains("0:00:00"))
{
return str.Replace(s, "");
}
else
{
return str;
}
}
catch (Exception)
{
return ("...");
}
}

posted @ 2016-10-27 21:12  Debugs  阅读(223)  评论(0编辑  收藏  举报