added methods to validate an email address tring, trim leading, trailing and leading & trailing spaces from a string and a method to URL encode a string