Skip to content

Conversation

@nsnk
Copy link
Contributor

@nsnk nsnk commented Jan 26, 2019

No description provided.

//string reverse
fn main() {
let mut num=String::new();
io::stdin().read_line(&mut num);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use io::stdin().read_line(&mut num).expect("Invalid input"); to print warning when no input is provided.

@swarnimarun
Copy link

Not sure if such examples are needed that directly use std functions...

Nonetheless I am pretty sure we don't want to use this method for reverse because it ends up with reversed USVs which is likely not what we want.

For more details read the Unicode Docs and stuff...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants