printf method
Prints formatted text above the TUI output.
This only works in inline mode (non-alt-screen). In fullscreen mode, this method does nothing.
program.printf('Loaded %d items', [items.length]);
Implementation
void printf(String format, List<Object?> args) {
if (!_running || _options.altScreen) return;
// Simple printf-style formatting
var result = format;
for (final arg in args) {
result = result.replaceFirst(
RegExp(r'%[sdifxXobeEgGaAcsp%]'),
arg.toString(),
);
}
println(result);
}