26.18. 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.
Returns

This function returns one of the following values:

  • A pointer to the Slapi_Filter structure representing the search filter.
  • NULL if the string cannot be converted; for example, if an empty string is specified or if the filter syntax is incorrect.
When you are done working with this filter, you should free the Slapi_Filter structure by calling slapi_filter_free().