In Dart, I am using print()
to write content to the console.
Is it possible to use print()
without it automatically adding a newline to the output?
In Dart, I am using print()
to write content to the console.
Is it possible to use print()
without it automatically adding a newline to the output?
You can use stdout
:
stdout.write("foo");
will print foo
to the console but not place a \n
after it.
You can also use stderr
. See:
How can I print to stderr in Dart in a synchronous way?