On Thu, Aug 25, 2016 at 12:55 PM, DrGo <salah.mah...@gmail.com> wrote:
> Should not scanner.Peek do whatever scanner.Scan does just without advancing
> the scanner?

It does; scanner.Scan returns the next rune in the string and
scanner.Peek returns the next rune in the string without advancing the
scanner.

Are you confusing text/scanner (which operates on UTF-8 strings and
returns runes) and bufio's Scanner (which is an "interface for reading
data such as a file of newline-delimited lines of text")?

—Sam


-- 
Sam Whited
pub 4096R/54083AE104EA7AD3

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to