请输入您要查询的百科知识:

 

词条 strncmpi
释义

函数名: strnicmp

功 能: 将一个串中的一部分与另一个串比较, 不管大小写

用 法: int strnicmp(char *str1, char *str2, unsigned maxlen);

程序例:

#include <string.h>

#include <stdio.h>

int main(void)

{

char *buf1 = "BBB", *buf2 = "bbb";

int ptr;

ptr = strnicmp(buf2, buf1);

if (ptr > 0)

printf("buffer 2 is greater than buffer 1\");

else if (ptr < 0)

printf("buffer 2 is less than buffer 1\");

else

printf("buffer 2 equals buffer 1\");

return 0;

}

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/23 1:41:09