2019年9月6日

C#中使用IndexOf()判断字符串在字符串数组中第一次出现的索引位置

摘要: string[] s = new string[4] {"111","222","333" ,"444"}; string s1 = "3335"; //判断字符串的前几位在另一个字符串数组中第一次出现的索引位置 index = Array.IndexOf(s, s1.Substring(0, 2)); 阅读全文

posted @ 2019-09-06 16:46 Keepshining 阅读(4315) 评论(0) 推荐(0) 编辑

导航