idx_in_list()

idx_in_list()#

Check if a value exists in a list and return its index.

Prototype

PUBLIC int idx_in_list(
    const char  *list[],
    const char  *value
);
        

Parameters

Key

Type

Description

list

const char *[]

The list of strings to search.

value

const char *

The value to search for in the list.


Return Value

Returns the index of the value in the list, or -1 if the value is not found.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples