public static StringCollection MultivalueStr2List(string mvString, string prefix, string postfix, string separator) { string[] arr = StringLibs.Str2List(mvString, separator); StringCollection list = new StringCollection(); int tmpLen; for (int idx = 0; idx < arr.Length; idx++) { arr[idx] = arr[idx].Trim(); if (arr[idx].StartsWith(prefix)) { arr[idx] = arr[idx].Remove(0, prefix.Length); } tmpLen = arr[idx].LastIndexOf(postfix); if (tmpLen > 0) { arr[idx] = arr[idx].Remove(tmpLen); } list.Add(arr[idx]); } return(list); }
public static string ConcatFileName(params string[] fileNames) { return(StringLibs.MakeString("\\", fileNames)); }