字符串查找操作。

#include<string.h>

main(){
  char * s="012d345678dd1d23";
  char *p;
  p=strstr(s,"123");
  # 如果找不到就会返回0
  if(p!=0){
    printf("%s\n",p);
  }else{
    printf("%s\n","没找到");
  }

}

 

相关文章:

  • 2022-12-23
  • 2021-06-14
  • 2021-08-04
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
猜你喜欢
  • 2022-01-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-10-01
  • 2022-12-23
相关资源
相似解决方案