标签:
char * strcpy (char *strDes, const char *strSrc) { assert((strDes != NULL) && (strSrc != NULL) ); char *address = strDes; while((*strDes++ = *strSrc++) != ‘\0‘); //复制-包括‘\0‘ return address; }
int strlen(const char* str) { assert(str != NULL); int len = 0; while((*str++) != ‘\0‘) { len++; } return len; }
标签:
原文地址:http://www.cnblogs.com/sfqh/p/5170432.html