On 2013/4/5 Robert Clausecker wrote:
Testing reveals that appending a dummy %c to the end of the formatting
string consumes a character that may or may not be pushed back otherwise
reliably. As I read the documentation this is still no guarantee that
this may change in future versions as the specification is a bit vague
on what formatting specifiers require a lookahead char.
It would be nice if somebody could confirm if the current behavior is
implementation defined or not. If not, how can I resolve this issue
without relying on implementation defined behavior?
Testing reveals that appending a dummy %c to the end of the formatting
string consumes a character that may or may not be pushed back otherwise
reliably. As I read the documentation this is still no guarantee that
this may change in future versions as the specification is a bit vague
on what formatting specifiers require a lookahead char.
It would be nice if somebody could confirm if the current behavior is
implementation defined or not. If not, how can I resolve this issue
without relying on implementation defined behavior?
bufio.Reader.ReadBytes/ReadSlice for example), then use fmt.Fscanf on
a bytes.Reader set to read this line.
Rémy.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.