I get a string which contains a sentence in two lines :
'hello this is my first.
program matlab'
and I want to change the sentence to be represend in on line:
'hello this is my first.program matlab'
How could I do it with matlab ?
Replace all occurrences of \n
to ''
myNewSt = strrep(mySt,sprintf('\n'),'');
For example, type:
strrep( sprintf('this is my \n string'),sprintf('\n'),'')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With