About Trim Text Lines
When is it useful? Trim Text Lines removes spaces and tabs from the start and end of every line — the invisible spaces that break imports into Excel, cause duplicate entries, or make code and lists look untidy.
Good to know: only spaces at the beginning and end of each line are removed; spaces between words stay. Empty lines are kept as empty lines, and the line ending style (Windows or Unix) and final newline of your file are preserved.
Example: you copy a list of names from a PDF and paste it into a text file, but many lines start with spaces or tabs. After trimming, every name starts at the left edge, so sorting and removing duplicates work correctly and the list imports neatly into Excel.