---
name: "match_string"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/match_string"
---

# match\_string(9)

matches given string in an array

## NAME

match\_string - matches given string in an array

## SYNOPSIS

**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.

## COPYRIGHT
