/* exnset.c - Sample code for uninset.
Fill up to n characters of existing string.
*/
#include <nunicode.h>
#include <assert.h>
void main(void)
{
unicode s1[20];
punicode ret;
unicode fill = ’.’;
unicpy(s1, L"StarFish");
ret = uninset(s1, fill, 4);
assert (unicmp(s1, L"....Fish") == 0);
assert (ret == s1);
/* Fill stops after 8 chars when it hits a NULL in the destination. */
ret = uninset(s1, fill, 20);
assert (unicmp(s1, L"........") == 0);
}