- //此方法返回按“<>”符号分隔开的字符串。
- private string[] returnArrStr(string str,char left,char right)
- {
- string strFileName = "";
- string[] newFileName;
- string[] fileName = str.Split(new char[] { left });
- for (int i = 0; i < fileName.Length; i++)
- {
- strFileName += fileName[i];
- }
- fileName = strFileName.Split(new char[] { right });
- newFileName = new string[fileName.Length - 1];
- for (int i = 0; i < fileName.Length; i++)
- {
- if (fileName[i] != "")
- {
- newFileName[i] = fileName[i];
- }
- }
- return newFileName;
- }
返回按 "[" "]" 分隔开的字符
最新推荐文章于 2023-05-26 15:50:35 发布