42.18. slapi_value_new_string()

Description

This function returns a Slapi_Value structure containing a value duplicated from the string passed as the parameter.

Syntax

#include "slapi-plugin.h"
slapi_value_new_string(const char *s);

Parameters

This function takes the following parameter:

s
A null-terminated string used to initialize the newly-allocated Slapi_Value.
Returns

This function returns a pointer to the newly allocated Slapi_Value. If space cannot be allocated (for example, if no more virtual memory exists), the slapd program will terminate.

Memory Concerns

When you are no longer using the value, you should free it from memory by calling slapi_value_free().