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;
}