示例#1
0
 public static string GetGoodString(string strSource, int maxLength)
 {
     if (StringTool.GetLength(strSource) > maxLength)
     {
         return(StringTool.GetSubString(strSource, maxLength, ""));
     }
     return(strSource);
 }
示例#2
0
 public static string GetGoodStringByOther(string strScoure, string strOther, int maxTotal)
 {
     return(GetGoodString(strScoure, maxTotal - StringTool.GetLength(strOther)));
 }