24.13. slapi_entry_attr_get_charptr()

Gets the first value of an attribute of 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 one of the following values:

  • A copy of the first value in the attribute.
  • NULL if the entry does not contain the attribute.
Memory Concerns

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