Recommanded Free YOUTUBE Lecture: <% selectedImage[1] %>
  1. strnicmp
  2. 대소문자 무시비교
  3. [acidd15]
  4. Version 0.1
  5. 2005/01/02

설명

case ignore comparing 대소문자 무시하고 비교

사용방법

코드

#include <stdio.h>

int strnicmp(char *str,char *needle,int len){

  int count=0;

  while(count!=len){

    if(tolower(*(str+count))==tolower(*(needle+count))){

      ++count;

    }else{

      return 1;

    }

  }

  return 0;

}

int main(int argc,char **argv){

  char *name="iAM ^^";

  if(strnicmp(name,"iam",3)==0){

    printf("yes\n");

  }else{

    printf("no\n");

  }

  return 0;

}

변경사항

2004/01/08