public static char FoldCase(char c, bool tocaps, bool xmlTags)
{
if (!xmlTags)
{
short m = Map(c);
if (tocaps)
{
if ((m & LOWERCASE) != 0)
c = (char) (c + 'A' - 'a');
}
/* force to lower case */
else
{
if ((m & UPPERCASE) != 0)
c = (char) (c + 'a' - 'A');
}
}
return c;
}