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

slapi_entry_attr_get_charptr()

Gets the first value of an attribute in an entry as a string.

Syntax

#include "slapi-plugin.h"
char *slapi_entry_attr_get_charptr(const Slapi_Entry* e,
    const char *type);

Parameters

This function takes the following parameters:

e

Entry from which you want to get the string value.

type

Attribute type from which you want to get the value.

Returns

This function returns a copy of the first value in the attribute, or NULL if the entry does not contain the attribute.

Memory Concerns

When you are done working with this value, you should free it from memory by calling the slapi_ch_free() function.