Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newline in the err() method #4

Open
eopb opened this issue Aug 20, 2021 · 0 comments
Open

newline in the err() method #4

eopb opened this issue Aug 20, 2021 · 0 comments

Comments

@eopb
Copy link
Owner

eopb commented Aug 20, 2021

Copied from https://gitlab.com/efunb/read_input/-/issues/5

It seems that the err() method automatically append a newline character at the end. Is it possible to not add this newline and let the user add it if necessary? I have the following code:

    let input = input::<u8>()
        .msg("What's your age: ")
        .err("That's not correct, try again: ").get();

The user input for msg() is at the same line with What's your age: . I want the user's next try is also at the same line with That's not correct, try again:. That will make the UI a little bit more clean. Thanks.

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

No branches or pull requests

1 participant