A directory entry can be described by a string in LDIF format.
Calling the slapi_str2entry() function converts a string description in this format to a Slapi_Entry structure, which you can pass to other API functions.
This function modifies the string argument s. If you must use the string value again, make a copy of this string before calling slapi_str2entry().
If an error occurred during the conversion process, the function returns NULL instead of the entry.
When you are finished working with the entry, you should call the slapi_entry_free() function.
To convert an entry to a string description, call the slapi_entry2str() function.