#include int strncmp(CONST char *s1, CONST char *s2, size_t n) { while (n-- && *s1 && *s2 && *s1 == *s2) { s1++; s2++; } if ((n+1) == 0 || *s1 == *s2) return 0; if
http://www.codebf.com/read/172774/5382097
#include char *strpbrk(CONST char *s1, CONST char *s2) { int i = strcspn(s1, s2); if (s1[i]) return (char *)&s1[i]; return 0; }
http://www.codebf.com/read/172774/5382098
#include char *strncpy(char *s1, CONST char *s2, size_t n) { char *s = s1; for ( ;*s2 && n; n--) *s1++ = *s2++; while (n--) *s1++ = 0; return s; }
http://www.codebf.com/read/172774/5382099
#include size_t strcspn(CONST char *s1, CONST char *s2) { size_t i; int j; for (i = 0; *s1; s1++, i++) { for (j = 0; s2[j]; j++) if (*s1 == s2[j]) return i; }
http://www.codebf.com/read/172774/5382100
#include char *strstr(CONST char *s1, CONST char *s2) { int i = strlen(s1); int j = strlen(s2); for ( ; i && i >= j; s1++, i--) if (strncmp(s1, s2, j) == 0) return (char
http://www.codebf.com/read/172774/5382101
#include char *strchr(CONST char *s, int c) { while (*s && *s != c) s++; if (*s == c) return (char *)s; return 0; }
http://www.codebf.com/read/172774/5382102
#include char *strrchr(CONST char *s, int c) { CONST char *p; for (p = 0; *s; s++) if (*s == c) p = s; if (*s == c) p = s; return (char *)p; }
http://www.codebf.com/read/172774/5382105
#include char *strncat(char *s1, CONST char *s2, size_t n) { char *s = s1; while (*s1) s1++; while (*s2 && n--) *s1++ = *s2++; *s1 = 0; return s; }
http://www.codebf.com/read/172774/5382106
#include int strcmp(CONST char *s1, CONST char *s2) { while (*s1 && *s2 && *s1 == *s2) { s1++; s2++; } if (*s1 == *s2) return 0; if (*s1 < *s2) return -1; ret
http://www.codebf.com/read/172774/5382109
#include int strcoll(CONST char *s1, CONST char *s2) { return strcmp(s1, s2); }
http://www.codebf.com/read/172774/5382111
虫虫下载站 半导体技术网 电子研发网 源码地带 电源技术网 单片机技术网 医疗电子技术 嵌入式系统与单片机