How do I remove a trailing newline? April 9, 2022 by IT Nursery How do I remove the last character of a string if it is a newline? "abc\n" --> "abc" 2 27