Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Dartの文字列から改行を削除するにはどうすればよいですか?
たとえば、変換したい:
"hello\nworld"
に
"hello world"
replaceAll(パターン、置換)を使用できます:
main() { var multiline = "hello\nworld"; var singleline = multiline.replaceAll("\n", " "); print(singleline); }