chrFparx

Find a parenthesised expression in a character string

Description:

This function searches the string "str" to identify a sub-string containing a parenthesised expression and returns the character positions of the opening and closing parentheses in the "f" and "l" arguments. Allowance is made for nested parentheses. If a parenthesised expression was not found, then the returned value of "f" will be greater than the returned value of "l".

Invocation

void chrFparx( const char str, char oppar, char clpar, size_t f, size_t l )

Parameters :

str
Pointer to a null terminated string holding the string to be searched.
oppar
The opening parenthesis character.
clpar
The closing parenthesis character.
f
Returned holding the zero-based character position of the opening parenthesis.
l
Returned holding the zero-based character position of the closing parenthesis.