rsio
English
A simple Rust IO helper library for console input.
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
Usage
use ;
API
input() -> String— Reads a line from stdin, trims whitespace, and returns it as aString.input_num<F: FromStr>() -> F— Reads a line from stdin and parses it into the specified numeric type.
License
MIT
中文
一个简单的 Rust 控制台输入辅助库。
安装
在 Cargo.toml 中添加:
[]
= "0.1.0"
使用
use ;
API
input() -> String— 从标准输入读取一行,去除首尾空白后返回String。input_num<F: FromStr>() -> F— 从标准输入读取一行并解析为指定数字类型。
许可协议
MIT