public static TDData ParseParamToTD(ref string data) { string temp = data; ReplaceArrFeature(ref temp, true); string[] item; string[] splits = temp.Split(TD_CHAR_HYPHENS); int max = splits.Length; TDData td = new TDData(); for (int i = 0; i < max; i++) { temp = splits[i]; if (!string.IsNullOrEmpty(temp)) { item = temp.Split(StringUtils.SPLIT_CHAR); td.Add(ref item); } else { } } return(td); }
public static void ParseAttributes(ref string data, out int[] keys, out int[] values) { TDData temp = ParseParamToTD(ref data); int row = temp.Source.Count; keys = new int[row]; values = new int[row]; string[] vs; for (int i = 0; i < row; i++) { vs = temp.Source[i]; keys[i] = int.Parse(vs[0]); values[i] = int.Parse(vs[1]); } }