It was originally used only when trimming names. What is does is to remove separators (white spaces, end of line, etc) at the end of the string we just trimmed.