用递归函数解决这个问题
1、
int __strlen( char *str_source)
{
assert( NULL == str_source );
if ( '/0' == *str_source)
{
return 0 ;
}
else
{
return ( 1 + __strlen( ++str_source ) );
}
}
2、
int __strlen( char *str_source)
{
assert( NULL == str_source);
return ( ( '/0' != *str_source ) ? ( 1 + __strlen( ++str_source ) ) : 0);
}