fixed a bug with String::Trim(), and added regrssion tests to capture it