/// <summary>文字长度截取(超出部分使用...代替)</summary>
public static string InterceptionLength(string str, int length)
{
if (string.IsNullOrEmpty(str)) return null;
if (str.Length <= length) return str;

string temp = null;

float count=0;

for (int i = 0; i < str.Length; i++)
{
if(str[i].Equals('@')|| str[i].Equals('¥') || str[i].Equals('%'))
{
count += 1;
}
else
{
if (str[i] > 127) count += 1;
else count += 0.5f;
}

if (count - length > -0.5f)
{
break;
}
else temp += str[i];
}

return temp+="...";
}