vf_find_prop_qual_index3
Vf_find_prop_qual_index()
Usage
#include <../vformat/vf_iface.h>
extern bool_t vf_find_prop_qual_index
(
VF_PROP_T *p_prop,
uint32_t *p_qualifier_index,
uint32_t *p_found_value_index,
const char **pp_possible_values,
const char *p_token,
vf_search_flags_t match
);
Parameters
VF_PROP_T *p_prop
|
The property we're querying. |
|---|---|
uint32_t *p_qualifier_index
|
Ptr to output name index. |
uint32_t *p_found_value_index
|
Ptr to output index in array. |
const char **pp_possible_values
|
Array of possible values. |
const char *p_token
|
Token searched for. |
vf_search_flags_t match
|
String comparison flags. |
Overview
Locate property qualifier given either an array of possible values or a single token that is either present or absent. For example if we have a property:
NAME;THIRD;TIME;LUCKY:VALUE1;VALUE2;VALUE3
Then there are two possible searches.
Firstly we can look for the property qualifier which can take values from the array { "FIRST", "SECOND", THIRD" } in which case the array is passed as pp_possible_values and the function returns with the values *p_found_value_index=2, p_qualifier_index=1
Secondly we can look for the token with value "TIME" in which case p_token is set to "TIME" and the function returns *p_qualifier_index=2.
Returns
TRUE iff found, FALSE else.
Releases
10 releases since Debian 3.1 (Sarge); the text changed 1 time.