Strip newline from input