文字列をフォーマットされた文字列に変換するにはどうすればよいですか
私が持っている次の文字列
"It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us"
このように文字列の上に変換する必要があります
"It was the best of times, it was the worst of times,\\n" +
" it was the age of wisdom, it was the age of foolishness,\\n" +
" it was the epoch of belief, it was the epoch of incredulity,\\n" +
" it was the season of Light, it was the season of Darkness,\\n" +
" it was the spring of hope, it was the winter of despair,\\n" +
" we had everything before us, we had nothing before us";