Everything

strcmp


Character string comparison

[Classification]

Standard library

[Syntax]

#include <string.h>

int strcmp(const char *s1, const char *s2);

[Return value]

Returns an integer greater than, equal to, or less than 0, depending on whether the character string indicated by s1 is greater than, equal to, or less than the character string indicated by s2.

[Description]

This function compares the character string indicated by s1 with the character string indicated by s2.