Embedded Artistry Framework
Embedded Systems C++ Framework
Functions
strcmp.c File Reference
#include <string.h>
Include dependency graph for strcmp.c:

Functions

int strcmp (const char *s1, const char *s2)
 Compares two null-terminated byte strings lexicographically. More...
 

Function Documentation

◆ strcmp()

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

Compares two null-terminated byte strings lexicographically.

Compares two null-terminated byte strings lexicographically.

The behavior is undefined if s1 or s2 are not pointers to null-terminated byte strings.

Parameters
s1pointers to the null-terminated byte strings to compare
s2pointers to the null-terminated byte strings to compare
Returns
Negative value if s1 appears before s2 in lexicographical order. Zero if s1 and s2 compare equal, or if n is zero. Positive value if s1 appears after s2 in lexicographical order.

References NULL, r, s1, and s2.

Referenced by heapsort_r_string_test(), heapsort_string_test(), main(), qsort_r_string_test(), qsort_string_test(), scmp(), strcat_test(), strcmp_test(), strcoll(), strcpy_test(), strncat_test(), strtok_test(), TEST_CASE(), wctrans(), and wctype().

Here is the caller graph for this function: