Sun Java System Directory Server Enterprise Edition 6.3 Developer's Guide

slapi_find_matching_paren()

Find a right parenthesis matching a left parenthesis.

Syntax

#include "slapi-plugin.h"
char *slapi_find_matching_paren( const char *str );

Parameters

This function takes the following parameters:

str

Pointer to a string starting with a left parenthesis

Returns

This function returns a pointer to the right parenthesis if successful. Otherwise, it returns NULL indicating that no matching right parenthesis was found.

Description

This function takes a pointer to a string starting with a left parenthesis, (, and returns a pointer to the matching right parenthesis, ). It may be useful when evaluating complex search filter strings.