[C] 比较两个串s1和s2的前n个字节, 忽略大小写 →→→→→进入此内容的聊天室

来自 , 2020-05-05, 写在 C, 查看 124 次.
URL http://www.code666.cn/view/cc7e2b87
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void)
  5. {
  6.    char *buf1 = "ABCDE123";
  7.    char *buf2 = "abcde456";
  8.    int stat;
  9.    stat = memicmp(buf1, buf2, 5);
  10.    printf("The strings to position 5 are ");
  11.    if (stat)
  12.       printf("not ");
  13.    printf("the same\n");
  14.    return 0;
  15. }
  16.  

回复 "比较两个串s1和s2的前n个字节, 忽略大小写"

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

captcha