コード例 #1
0
ファイル: StringTool.cs プロジェクト: yzbjack/LebiShop
 public static string GetGoodString(string strSource, int maxLength)
 {
     if (StringTool.GetLength(strSource) > maxLength)
     {
         return(StringTool.GetSubString(strSource, maxLength, ""));
     }
     return(strSource);
 }
コード例 #2
0
ファイル: StringTool.cs プロジェクト: yzbjack/LebiShop
 public static string GetGoodStringByOther(string strScoure, string strOther, int maxTotal)
 {
     return(GetGoodString(strScoure, maxTotal - StringTool.GetLength(strOther)));
 }