how to remove \r\n from string node js code example Example: remove n string a_string = a_string.rstrip("\n")