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

slapi_str2filter()

Converts a string description of a search filter into a filter of the Slapi_Filter type.

Syntax

#include "slapi-plugin.h"
Slapi_Filter *slapi_str2filter( char *str );

Parameters

This function takes the following parameter:

str

String description of a search filter.

Memory Concerns

Do not pass a static string to this function. Instead, create a duplicate using slapi_ch_strdup(). When you are finished working with this filter, you should free the Slapi_Filter structure by calling slapi_filter_free().

Returns

Pointer to the Slapi_Filter structure representing the search filter, or NULL if the string cannot be converted (for example, if an empty string is specified or if the filter syntax is incorrect).