How to remove lines from a line in Dart?
For example, I want to convert:
"hello\nworld"
to
"hello world"
You can use replaceAll (template, replacement):
main() { var multiline = "hello\nworld"; var singleline = multiline.replaceAll("\n", " "); print(singleline); }