Implement C funtion "strlen" in your own code.
---- unsigned int strlen(const char *s){ unsigned int i = 0; while(s[i] != '\0'){ i++; } return i; } ---- unsigned int strlen(const char *s){ const char *p = s; while(*p++ != '\0'); return p-s-1; }
版权所有 © 非是非, 2007~2015