char* strcpy(char * dst, const char * src)
{
char * cp = dst;
while( *cp++ = *src++ ); /* Copy src over dst */
return( dst );
}
Char* strcat ( char * dst , const char * src )
{
char * cp = dst;
while( *cp )
cp++; /* find end of dst */
while( *cp++ = *src++ ) ; /* Copy src to end of dst */
return( dst ); /* return dst */
}
/* returns -1 if src < dst
* returns 0 if src == dst
* returns +1 if src > dst
*/int 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 );
}