strcmp
时间:2010-03-05 来源:doujiao
int __cdecl strcmp (
const char * src,
const char * dst
)
{
int ret = 0 ;
while( ! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst)
++src, ++dst;
if ( ret < 0 )
ret = -1 ;
else if ( ret > 0 )
ret = 1 ;
return( ret );
}
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hairetz/archive/2009/09/10/4540005.aspx
const char * src,
const char * dst
)
{
int ret = 0 ;
while( ! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst)
++src, ++dst;
if ( ret < 0 )
ret = -1 ;
else if ( ret > 0 )
ret = 1 ;
return( ret );
}
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hairetz/archive/2009/09/10/4540005.aspx
相关阅读 更多 +