摘要:
#include #include size_t mstrlen(const char *s){ assert(s != NULL); if (s == NULL) { return 0; } size_t ret = 0; while (*s != '\0') { ++ret; ++s; } return ret;}void test_strlen(){ char a[] = "hello,world"; printf("%lu\n", mstrlen(a));}char *mstrcpy(char *dst, const char * 阅读全文