IO read library
September 1, 2024 ยท View on GitHub
Source: include/stdlib/io/read.ml
Extendable and safe frontend for scanf/fscanf.
Functions
| Function | Description |
|---|---|
_read | read handlers that call fscanf based on the argument type |
Macros
| Macro | Description |
|---|---|
| input | Reads a string (str, not c_str) from stdin until a newline is found |
| read | Reads values from stdin and updates its arguments |
| read_from | Reads values from the given stream and updates its arguments |
Extensibility
Important
To extend read or any of the macros, simply declare a new _read helper with a c_stream argument and a pointer to the custom type to extend.