RK added (remove-newline str) function