striequ.c

来自「mips架构的bootloader,99左右的版本 但源代码现在没人更新了」· C语言 代码 · 共 41 行

C
41
字号
/************************************************************* * File: lib/striequ.c * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: *	970304	Start of revision history */#include "string.h"/**************************************************************  int striequ(s1,s2) *	returns 1 if s1 matches s2 ignoring case, else 0 */int striequ(s1,s2)char *s1,*s2;{if (!s1 || !s2) return(0);for (;*s1;s1++,s2++) {	if (toupper(*s1) != toupper(*s2)) return(0);	}if (*s2) return(0);return(1);}#if 0 /*HTML*/$NAME=striequ;$SYNOPSIS= <<EOF;#include <string.h>int striequ(char *s1, char *s2)EOF$DESCRIPTION= <<EOF;striequ() compares  its  arguments  and  returns  an  integer equal toone or 0, depending whether s1 is equal to, or not equal to s2. Thecase of the characters is ignored during the comparison.EOF$SEEALSO="strcmp strequ strncmp";$CATAGORY=string;#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?