|
Class Scanf::IO |
|
| Methods |
| Public Instance methods |
| scanf(str,&b) src |
Match succeeds (non-emptily) and the last attempted spec/string sub-match succeeded:
is the current matched spec a '[' or 'c' with a width?
yes: is current.string.size < available width?
yes: save interim results
no: width is used up, so move on (next)
no: is it a '[' with no width?
yes: evidently nothing violated it yet, so store
interim results and continue (next)
(c means %c)
(cc means character class)
The last attempted spec/string did not match:
are we on the next-to-last spec in the string?
no: fatal failure
yes:
is fmt_string.string_left all spaces?
yes: does current spec care about input space?
yes: fatal failure
no: save interim results and continue