ldap_x_utf8_next

Find the next character in a UTF-8 string.

Library:*ldapsdk.*
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>
  
  char* ldap_x_utf8_next (
     const char *p);
  

Parameters

p

(IN) Points to a UTF-8 string.

Return Values

Returns the address of the next UTF-8 character in the string.

Remarks

The function will step over NULLs just like any other character. The application must take care not to step beyond the end of the string.

Example

  /* String starts with a 3-byte UTF-8 character. */
  char utstr[] = { 0xe2U, 0x98U, 0xa0U, ’a’, ’b’, ’c’, 0 };
  char *p = ldap_x_utf8_next(utstr);       /* p now points to the ’a’ char */
  p = ldap_x_utf8_next(p);   /* p now points to the ’b’ char */