ldap_x_utf8_copy

Copy one UTF-8 character.

Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap_utf8.h>
  
  int ldap_x_utf8_copy (
     char        *dst,
     const char  *src);
  

Parameters

dst

(IN) Points to the output buffer.

src

(IN) Points to the UTF-8 character to copy.

Return Value

Number of bytes copied.

Example

  char utstr[] = { 0xe2U, 0x98U, 0xa0U, ’a’, ’b’, ’c’, 0 };
  char dest[3];
  int n = ldap_x_utf8_copy(dest, utstr);  /* Copies 1st char.  Returns 3. */