unichr

Finds the first occurrence of a given character in a specified string.

Library:LibC
Service:Characters and Strings

Syntax

  #include <unilib.h> 
   
  unicode_t *unichr (
     const unicode_t   *string,
     unicode_t          ch);
  

Parameters

string

(IN) Points to the string to be scanned.

ch

(IN) Specifies the character to be found.

Return Values

Returns one of the following values:

Non-NULL

Pointer to the first occurrence of the ch character in the string.

NULL

The ch character does not occur in the string.

Remarks

The null terminator is part of the string. For example, unichr (string, 0) returns a pointer to the null-terminating character of string.

The unichr function corresponds to the strchr function.

See Also