suve

awful: function: stdin-clear

Declaration

int :stdin-clear

Summary

Empties the stdin buffer. Returns number of bytes discarded.

Example

# :stdin-clear example
:set &STR s''
:read &STR
# :read, contrary to :readln, reads strings only until first space character
:writeln s'STR: ' $STR
:writeln (:stdin-clear) s' bytes discarded.'

wikipage modified on 2014/0601/2317