/**
* Removes all the <VAR>' '</VAR> and <VAR>'-'</VAR>-characters on the right of a <CODE>string</CODE>.
* <P>
* @param string the <CODE>string<CODE> that has to be trimmed.
* @return the trimmed <CODE>string</CODE>
*/
internal string Trim(string str)
{
BaseFont ft = font.Font;
if (ft.FontType == BaseFont.FONT_TYPE_CJK && ft.GetUnicodeEquivalent(' ') != ' ')
{
while (str.EndsWith("\u0001"))
{
str = str.Substring(0, str.Length - 1);
}
}
else
{
while (str.EndsWith(" ") || str.EndsWith("\t"))
{
str = str.Substring(0, str.Length - 1);
}
}
return(str);
}