We are trying to push a simple console input API into the standard library to make writing simple command line input easier, and we need the community to decide on how advanced the implementation should be. Since this is quite a controversial topic (very even amount on each side), this poll was made to settle this.
NOTE: These examples below are not final, just a concept for what it might look like.
Simple Input Example:
"""
let age: i32 = std::inputln!()?.parse().expect("Invalid age!");
"""
Advanced Input Example:
"""
let person = scan!("{} {}", String, u8).expect("Invalid input!");
// or
let name: String;
let age: u8;
scan!("{} {}", name, age).expect("Invalid input!");
"""
Comments
Guest
···
Guest
···
CancelReply
No comments yet. Be the first to write one!
Guest
···
Guest
···
CancelReply
No comments yet. Be the first to write one!
No comments yet. Be the first to write one!
Showing 1 to 0 of 0 results
Comments are disabled.
This content is neither created nor endorsed by StrawPoll.
Create Your Own Poll
Want to create your own poll? With StrawPoll anyone can easily create an online poll in seconds.
Comments
No comments yet. Be the first to write one!
No comments yet. Be the first to write one!
No comments yet. Be the first to write one!
Showing 1 to 0 of 0 results