OxL Reference

fn readLine

One line of standard input without the line break, none at end of input.

Example:

oxl✓ checked in CI
use std.io { readLine }

fn main() io {
  match readLine() {
    str line => print("you said: {line}")
    none => print("end of input")
  }
}
@intrinsic("io.readLine") pub(api) fn readLine() -> str?  io

Since. 1.0.0-beta

Returns

str?

Effects

io

Defined in: std/io/io.oxl:1085

See also