zoukankan
html css js c++ java
C++之手写strlen函数
代码:
int
strlen(
const
char
*
str)
{ assert(str
!=
NULL);
intlen
=
0
;
while
((*str++)!=
'