strpattern_match_invoke_data()
Get the data of an invoke associated with a pattern match.
Synopsis:
#include </strpattern.h>
int strpattern_match_invoke_data(const strpattern_match *match, int index, const void **p_data, int *err)
Arguments:
- match
-
The match containing the invoke whose data is returned.
- index
-
The index of the invoke associated with the match.
- p_data
-
Pointer to receive the pointer to the data. Ownership is retained by the callee.
- err
-
STRPATTERN_EOK if there is no error.
Library:
libstrpatternDescription:
This function gets the data of an invoke associated with a pattern match and returns the length of the data. An invoke means that it was found by a recognizer and a match was created for it. A recognizer is an email address, phone number, PIN, SMS, or URL. If there is no data associated with the invoke, the return value is 0 and p_data points to NULL.
Returns:
The length of the data in bytes (-1 on error).