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