Fixed errors in StringUtils.trim method

previous code resulted in various compile time errors, this change corrects those