ArrayList args = new ArrayList();
args.add(str);
if (leading && trailing)
{
return new StringExpression("TRIM", args);
}
else if (leading)
{
return new StringExpression("LTRIM", args);
}
else if (trailing)
{
return new StringExpression("RTRIM", args);
}
return str; // Nothing to trim
}