![]() |
#2
luohaiping32016-01-28 16:28
|
我想截取字符串: "----中文字符----" 这个里面的“中文字符”,怎么做
int beginIndex = str.IndexOf("-");
string strDest = str.Substring(beginIndex + 4,4);
我是这样做的,可运行就报错提示:startIndex 不能大于字符串长度