C/C++ Example Procedure: strcmp - Compare two ASCII c-strings

See related: C/C++ Examples

int strcmp ( unsigned char *src, unsigned char *dst )
{
	int ret = 0;

	while( ! (ret = *src - *dst) && *dst)
		++src, ++dst;

	if ( ret < 0 )
		ret = -1;
	else if ( ret > 0 )
		ret = 1;

	return ret;
}

Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site.
OK