搜索字符串-C#入门经典ppt
搜索字符串[n] string poem = “Kubla Khan”; poem[0]; IndexOf, LastIndexOf(string, [int start], [int count]) int n=poem.IndexOf(“la”); n=poem.IndexOf(‘K’,4); IndexOfAny, LastIndexOf char[] chs = {‘a’, ‘e’, ‘i’, ‘o’, ‘u’}; N=poem.IndexOfAny(chs); N=poem.LastIndexOfAny(chs,2);如果没找到,返回-1
4.81MB
文件大小:
评论区