I need to take user input as string, which may/may not have multiple newline characters. But I need to modify this input in a single newline input. How can I achieve this without seeing the actual user input, preferably without any for loop.
input
"Walk a little slower, Daddy!" said a little child so small.
"I'm following in your footsteps and i don't want to fall.
Sometimes your steps are very fast, sometimes they're hard to see;
So walk a little slower Daddy, for you are leading me.
Someday when I'm all grown up, you're what i want to be.
Then i will have a little child who'll want to follow me.
And i would want to lead just right, and know that i was true;
So, walk a little slower, Daddy, for i must follow you!!"
output
"Walk a little slower, Daddy!" said a little child so small."I'm following in your footsteps and i don't want to fall.Sometimes your steps are very fast, sometimes they're hard to see;So walk a little slower Daddy, for you are leading me.
Someday when I'm all grown up, you're what i want to be.Then i will have a little child who'll want to follow me.And i would want to lead just right, and know that i was true;So, walk a little slower, Daddy, for i must follow you!!"