ldap_x_utf8_prev

Find the previous 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_prev (
     const char *p);
  

Parameters

p

(IN) Points to a UTF-8 string.

Return Values

Returns a pointer to the previous character in the string.

Remarks

The application must take care not to step beyond the beginning of the string.

Example

  char utstr[] = { 0xe2U, 0x98U, 0xa0U, ’a’, ’b’, ’c’, 0 };
  char *p = ldap_x_utf8_prev(utstr+4);       /* p now points to the ’a’ char */
  p = ldap_x_utf8_prev(p);         /* p now points to the beginning char */