stdio/core

sourcestdio/core.sx

printv

pub fn printv(data: str.StringView) void = trust { ... }

Write a borrowed string view to stdout without requiring null termination.

eprintv

pub fn eprintv(data: str.StringView) void = trust { ... }

Write a borrowed string view to stderr without requiring null termination.

puts

pub fn puts(data: str.StringView) void

Print a string followed by a newline to stdout.

print

pub fn print(fmt: str.StringView, args: argspack) void = trust { ... }

Print a formatted string to stdout.

GetStdHandle

when windowsprivate
extern (C, header) fn GetStdHandle(nStdHandle: i32) ref void = trust { ... } = "GetStdHandle"

WriteFile

when windowsprivate
extern (C, header) fn WriteFile(hFile: ref void, lpBuffer: ref void, nNumberOfBytesToWrite: u32, lpNumberOfBytesWritten: ref u32, lpOverlapped: ref void) i32 = trust { ... } = "WriteFile"

eputs

pub fn eputs(msg: str.StringView) void

Print a string to stderr followed by a newline (fd 2).

eprint

pub fn eprint(fmt: str.StringView, args: argspack) void = trust { ... }

Print a string to stderr followed by a newline (fd 2).

read_key

pub fn read_key() i32 = trust { ... }

Read a single character from stdin. Returns -1 on EOF.

read_line

pub fn read_line(buf: ref u8, max_len: i64) ref u8 = trust { ... }

Read a line from stdin into buf. (at most max_len bytes, including null terminator). Returns buf on success, or a null pointer on EOF/error.