match_string(9)

match_string9

Matches given string in an array

Usage

int match_string(const char *const * array, size_t n, const char * string);

Arguments

array

array of strings

n

number of strings in the array or -1 for NULL terminated arrays

string

string to match with

Return

index of a string in the array if matches, or -EINVAL otherwise.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.