Hello!

I understand that subinstr can be used to replace a substring in a column
https://www.stata.com/statalist/arch.../msg00386.html
Code:
gen newvar = subinstr(oldvar,"dis","reg",.)
I would like to replace all appearances of newline, i.e. cr/lf - char(10) or char(13) - in a column with the space character. I used
Code:
gen newvar = subinstr(oldvar,"`=char(10)'"," ",.)
gen newvar2 = subinstr(newvar,"`=char(13)'"," ",.)
Is this the best way of doing this? Is there a more efficient, single line command?

Also when thinking about next line character, are carriage return and line feed the only two I need to worry about, or are there other characters I am missing?