Function proconio::is_stdin_empty

source ·
pub fn is_stdin_empty() -> bool
Expand description

Checks if some of tokens are left on stdin.

This is useful when the number of test cases is not specified like ICPC problems.

loop {
    if is_stdin_empty() {
        break;
    }

    // do the normal logic
    input! { ... }
}