摘要:
;***;char *strrchr(string, ch) - find last occurrence of ch in string;;Purpose:; Finds the last occurrence of ch in string. The terminating; null character is used as part of the search.;... 阅读全文
摘要:
;***;char *strchr(string, chr) - search a string for a character;;Purpose:; Searches a string for a given character, which may be the; null character '\0'.;; Algorithm:; char *... 阅读全文
摘要:
;***;int strncmp(first, last, count) - compare first count chars of strings;;Purpose:; Compares two strings for lexical order. The comparison stops; after: (1) a difference between the st... 阅读全文
摘要:
;***;strcmp - compare two strings, returning less than, equal to, or greater than;;Purpose:; Compares two string, determining their lexical order. Unsigned; comparison is used.;; A... 阅读全文
摘要:
#include <stdio.h>#include <string.h>#include <assert.h>#include <stdlib.h>char *mystrcat (char * dst, const char * src){ char * cp = dst; while( *cp ) /* 不写成while(*cp++)的原因是cp可能为'\0'*/ ++cp; ... 阅读全文
摘要:
#include <stdio.h>#include <string.h>#include <assert.h>#include <stdlib.h>char *mystrncpy(char *dst, const char *src, size_t n){ assert(dst != NULL && src != NULL); char *dstCopy = dst; while (n && (... 阅读全文
摘要:
http://bbs.chinaunix.net/thread-25356-1-1.html #include <stdio.h>#include <string.h>#include <assert.h>#include <stdlib.h>char *strcpy(char *strDest, const char *strSrc){ assert(strDest != NULL && st... 阅读全文
摘要:
http://www.onmoso.com/android/331.html 阅读全文
摘要:
#include <assert.h>void assert(scalar expression);表达式为假,则调用abort终止程序的执行。也就是说,只有在满足表达式的情况下,程序才继续执行。 阅读全文