[C#] 找出字符在字符串中出现的位置和次数 →→→→→进入此内容的聊天室

来自 , 2021-02-05, 写在 C#, 查看 108 次.
URL http://www.code666.cn/view/ab452534
  1. int   getCharInfo(string child,string parent){
  2.    int count= 0;
  3.    int index = 0;
  4.    while((index = parent.IndexOf(child))!=-1){
  5.       count++;
  6.       index = index + chiled.Lenth;
  7.    }
  8. }

回复 "找出字符在字符串中出现的位置和次数"

这儿你可以回复上面这条便签

captcha