HOW TO CUT STRING UNTIL \R\N IN C code example Example: how to remove \n from a string c str[strcspn(str, "\n")] = 0;