Module std.format.read
This is a submodule of std.
It provides two functions for reading formatted input: unformatValue and formattedRead. The former reads a single
value. The latter reads several values at once and matches the
characters found between format specifiers.
Parameters are ignored, except for the ones consisting of a single
'*'. See formattedRead for more information.
A space outside of a format specifier has a special meaning: it matches any sequence of whitespace characters, not just a single space.
The following combinations of format characters and types are
available
| s | c | d, u, b, o, x, X | e, E, f, g, G | r | compound | |
|---|---|---|---|---|---|---|
| bool | yes | yes | ||||
| null | yes | |||||
| integer | yes | yes | yes | |||
| floating point | yes | yes | yes | |||
| character | yes | yes | yes | |||
| string | yes | yes | ||||
| array | yes | yes | ||||
| associative array | yes | yes | 
Below are highlighted examples on how these combinations are used
with unformatValue, however, they apply for formattedRead also
Example
Booleans
import stdExample
Null values
import stdExample
Integrals
import stdExample
Floating point numbers
import stdExample
Characters
import stdExample
Arrays
import stdExample
Associative arrays
import stdFunctions
| Name | Description | 
|---|---|
| 
									formattedRead(r, fmt, args)
								 | Reads an input range according to a format string and stores the read values into its arguments. | 
| 
									unformatValue(input, spec)
								 | Reads a value from the given input range and converts it according to a format specifier. | 
Authors
Walter Bright, Andrei Alexandrescu, and Kenji Hara