(Applies only to filters of the type LDAP_FILTER_SUBSTRINGS) Gets the substring values from the filter.
#include "slapi-plugin.h" int slapi_filter_get_subfilt( Slapi_Filter *f, char **type, char **initial, char ***any, char **final );
This function takes the following parameters:
Filter from which you wish to get the substring values.
Pointer to the attribute type of the filter.
Pointer to the initial substring (“starts with”) of the filter.
Pointer to an array of the substrings (“contains”) for the filter.
Pointer to the final substring (“ends with”) of the filter.
This function returns one of the following values:
0 if successful.
-1 if the filter is not one of the types listed above.
Filters of the type LDAP_FILTER_SUBSTRINGS generally compare a set of substrings against an attribute. For example:
This filter finds entries in which the value of the cn attribute starts with John, contains Q, and ends with Public.
Call this function to get these substring values as well as the attribute type from this filter. In the case of the example above, calling this function gets the initial substring John, the any substring Q, and the final substring Public in addition to the attribute type cn.