/* exchr.c - unichr sample. Find the first occurrence of a character. */
#include <nunicode.h>
#include <assert.h>
void main(void)
{
punicode puni = L"banana";
punicode ptr;
ptr = unichr(puni, ’a’); /* Returns ptr to the first ’a’ */
assert(unicmp(ptr, L"anana") == 0);
ptr = unichr(puni, ’Z’); /* If not found, return NULL. */
assert (ptr == NULL);
}