public static string SubString(string strData, int startIndex, int length)
{ int intLen = strData.Length; int intSubLen = intLen - startIndex; string strReturn;
if (length == 0) strReturn = ""; else { if (intLen <= startIndex) strReturn = ""; else { if (length > intSubLen) length = intSubLen;
strReturn = strData.Substring(startIndex, length); } } return strReturn; }
沒有留言:
張貼留言