Trim the string from both sides, not just the right side.