超出指定长度部分以省略号代替

    技术2022-05-12  10

    public string SubStr(string sString, int nLeng)     {         if (sString.Length <= nLeng)         {             return sString;         }         string sNewStr = sString.Substring(0, nLeng);         sNewStr = sNewStr + "...";         return sNewStr;     }

    最新回复(0)