26.8. slapi_filter_get_subfilt()
LDAP_FILTER_SUBSTRINGS. Gets the substring values from the filter.
Filters of the type LDAP_FILTER_SUBSTRINGS generally compare a set of substrings against an attribute. For example:
#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:
|
f
| Filter that you want to get the substring values from. |
|
type
| Pointer to the attribute type of the filter. |
|
initial
| Pointer to the initial substring ( "starts with" ) of the filter. |
|
any
| Pointer to an array of the substrings ( "contains" ) for the filter. |
|
final
| 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.
(cn=John*Q*Public)
cn attribute starts with John, contains Q, and ends with Public.
John, the any substring Q, and the final substring Public in addition to the attribute type cn.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.