ASP.NET代码看不懂?请教各位
public static string cutTitle(string str, int len){
int intLen = str.Length;
int start = 0;
int end = intLen;
int single = 0;
char[] chars = str.ToCharArray();
for (int i = 0; i < chars.Length; i++)
{
if (Convert.ToInt32(chars[i]) > 255)
{
start += 2;
}
else
{
start += 1;
single++;
}
if (start >= len)
{
if (end % 2 == 0)
{
if (single % 2 == 0)
{
end = i + 1;
}
else
{
end = i;
}
}
else
{
end = i + 1;
}
break;
}
}
看不懂这一段代码有什么作用?可否详细说明一下?谢谢!