Trim return, newline, and space from the start and end of a string
mystring.TrimEnd('\r', '\n', ' ').TrimStart('\r', '\n', ' ');