unidup

Creates a duplicate of the string pointed to by src and returns a pointer to the new copy.

Library:LibC
Service:Characters and Strings

Syntax

  #include <unilib.h> 
   
  unicode_t *unidup (
     const unicode_t   *s1);
  

Parameters

s1

(IN) Points to the string to be copied.

Return Values

Returns the pointer to the new copy of the string if successful; otherwise, it returns NULL.

Remarks

The memory for the new string is obtained by using the malloc function. The caller is responsible for freeing this memory by passing the returned pointer to the free function.

See Also

unicpy