simplify ucwords method in String class