Search results

There are no results.

std.stdio

Standard input and output streams.

This module provides types for working with STDOUT, STDERR, and STDIN.

Examples

Writing to STDOUT:

import std.stdio (Stdout)

Stdout.new.print('hello')

Writing to STDERR:

import std.stdio (Stderr)

Stderr.new.print('hello')

Reading from STDIN:

import std.stdio (Stdin)

let bytes = ByteArray.new
let stdin = Stdin.new

stdin.read_all(bytes).or_panic('failed to read from STDIN')

Classes

Stderr

The standard error stream of the current OS process.

Stdin

The standard input stream of the current OS process.

Stdout

The standard output stream of the current OS process.