Re: [go-nuts] Re: Rune-by-rune through a stream

2016-11-06 Thread roger peppe
On 6 November 2016 at 07:29, 'Axel Wagner' via golang-nuts wrote: > You would use a bufio.Scanner: > https://play.golang.org/p/aZ_vrR3eDq bufio.Reader works pretty well too: https://play.golang.org/p/Z0b2GfAs3T > > On Sun, Nov 6, 2016 at 7:23 AM, wrote: >> >> The io package has the RuneReader i

Re: [go-nuts] Re: Rune-by-rune through a stream

2016-11-06 Thread 'Axel Wagner' via golang-nuts
You would use a bufio.Scanner: https://play.golang.org/p/aZ_vrR3eDq On Sun, Nov 6, 2016 at 7:23 AM, wrote: > The io package has the RuneReader interface. > > You can wrap a generic io.Reader in a bufio.Reader > or if you already have a string or byte slice, you can use > strings.Reader or bytes.