ldap_x_utf8_strchr

Find a character in a 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_strchr (
     const char *str,
     const char *chr);
  

Parameters

str

(IN) Null-terminated UTF-8 string to search.

chr

(IN) Points to the UTF-8 character to be located.

Return Values

Returns the first occurrence of chr in str, or NULL if not found.

Example

  char utstr[] = { ’a’, ’b’, 0xe2U, 0x98U, 0xa0U, ’x’, ’y’, 0 };
  char chr[] = { 0xe2U, 0x98U, 0xa0U };
  char *p = ldap_x_utf8_strchr(utstr, chr);       /* Returns utstr+2 */