[Previous] [Next]

ldapu_strdup()

Copies a string value into a newly allocated space in memory (like the standard strdup() function).

Syntax
NSAPI_PUBLIC 
char *ldapu_strdup(const char *ptr);
Parameters
This function has the following parameters:
Name Description
ptr
The string that you want to copy.

Returns
If successful, returns a pointer to the copied string. If memory cannot be allocated, returns NULL.

Description
Call this function to copy a string value into a newly allocated space in memory. When you are done using the memory, you can free it by calling the ldapu_free() function.

If you just want to allocate memory, call the ldapu_malloc() function.

See Also
ldapu_free(), ldapu_malloc().


[Previous] [Next]


Copyright ⌐ 1997 Netscape Communications Corporation