Sun Directory Server Enterprise Edition 7.0 Developer's Guide

slapi_filter_get_subfilt()

(Applies only to filters of the type LDAP_FILTER_SUBSTRINGS) Gets the substring values from the filter.

Syntax

#include "slapi-plugin.h"
int slapi_filter_get_subfilt( Slapi_Filter *f, char **type,
    char **initial, char ***any, char **final );

Parameters

This function takes the following parameters:

f

Filter from which you wish to get the substring values.

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.

Returns

This function returns one of the following values:

Description

Filters of the type LDAP_FILTER_SUBSTRINGS generally compare a set of substrings against an attribute. For example:

(cn=John*Q*Public)

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.

See Also

slapi_filter_get_attribute_type()

slapi_filter_get_ava()

slapi_filter_get_choice()