2024年2月20日发(作者:)
for (int i = 0; i < len; i++) { if (q1[i].cType != q2[i].cType) { return q1[i].oValue[0] > q2[i].oValue[0] ? 1 : -1; } else { if (q1[i].oValue == q2[i].oValue) { continue; } if (q1[i].cType == ) { if (q1[i].oValue != q2[i].oValue) { int num1 = (q1[i].oValue); int num2 = (q2[i].oValue); return num1 > num2 ? 1 : -1; } } else { if (q1[i].oValue != q2[i].oValue) { int rlen = q1[i].; if (rlen > q2[i].) rlen = q2[i].; for (int j = 0; j < rlen; j++) { if (q1[i].oValue[j] != q2[i].oValue[j]) return q1[i].oValue[j] > q2[i].oValue[j] ? 1 : -1; } return q1[i]. > q2[i]. ? 1 : -1; } } } } if ( != ) return > ? 1 : -1; else return 0; } CharType GetCharType(char c) { if (c >= 48 && c <= 57) return ; else return ; } public List
if (OrEmpty(str) || == 0) { return null; } List
start = i; } } else { if (i == - 1) { CharType sType = GetCharType(str[i]); m = new Model(ing(start, i + 1 - start), sType); (m); } } } return sl; } }//for test public static void Main(string[] args) { string[] filenames = new string[] { "", "", "", "", "", "", "", "", "", "", "", "5", " 4", "3", "1.45", "7.8"}; (filenames, new FileNameComparer1()); foreach (string s in filenames) { ine(s); } ne(); }


发布评论