utf8dup

Creates a copy of a string and returns a pointer to the new copy.

Library:LibC
Classification:Novell
Service:Characters and Strings

Syntax

  #include <utf8.h> 
   
  utf8_t  *utf8dup (
     const utf8_t   *s);
  

Parameters

s

(IN) Points to the string to duplicate.

Return Values

If successful, returns a pointer to the new copy of the string; otherwise, returns a NULL pointer and sets errno to the following:

Decimal

Constant

Description

5

ENOMEM

Sufficient storage space is not available.

Remarks

The memory for the new string is obtained by using the malloc function and can be freed using the free function.

See Also

utf8cpy