Thanks everyone for the examples and suggestions!
I suppose the difference the between bufio.Reader versus bufio.Scanner is
that Scanner provides specific tokenizing rules/functions designed for
reading text while Reader is a more general data reader (and as Tamás
stated adds buffering to io.Re
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
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.
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.Reader respectively, to get a RuneReader.
On Saturday, November 5, 2016 at 10:40:34 PM UTC-7, so.q...@gmail.com wrote: