v / vlib / readline
0 issues 1 contributor 4 branches 0 releases
Clone with HTTPS:

About

README
  V 99.7% 272k loc
  JavaScript 0.1% 344 loc
  C 0% 63 loc
  C++ 0% 95 loc
  Go 0% 63 loc
52 years ago
..
readline_linux.c.v checker: improve pub struct check (fix checker: improve pub struct check (fix #14446) (#14777)) (checker: improve pub struct check (fix #14446) (#14777)) last Jun 19
readline_test.v fmt: fix import with symbols (fix fmt: fix import with symbols (fix #12065) (#12069)) (fmt: fix import with symbols (fix #12065) (#12069)) 1 year ago

Description

The readline module lets you await and read user input from a terminal in an easy and structured manner.

The module provides an easy way to prompt the user for questions or even make a REPL or an embedded console.

Usage:

import readline

mut r := readline.Readline{}
answer := r.read_line('hello: ')?
println(answer)

or just:

import readline { read_line }

input := read_line('What is your name: ')?
println('Your name is: $input')