The following method trims the given string of both white-space characters and control characters, and its rather fast!