#include <string.h>

char* strncmp( char* string1, char* string2, size_t max_len );

Let s denote the string obtained by choosing string2 or max_len characters from string2, whichever is shorter. Returns a negative integer is string1 is (lexicographically) less than s. Returns 0 if string1 is equal to s. Returns a positive integer if string1 is greater than s.

Back to Essential C Functions.

Log in or register to write something here or to contact authors.