Author: Unknown
•19:29
public string GetSubstring(string ostr, int n)
{
if (ostr.Length <= n) //如果ostr长度小于n,返回ostr
return ostr;
else
{
return ostr.Substring(0, n) + "…";
}
}
This entry was posted on 19:29 and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 评论: