• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D24-Jan-20166

.travis.ymlH A D24-Jan-201675

README.mdH A D24-Jan-20162.2 KiB

buffruneio.goH A D24-Jan-20162.3 KiB

buffruneio_test.goH A D24-Jan-20162.6 KiB

README.md

1# buffruneio
2
3[![Tests Status](https://travis-ci.org/pelletier/go-buffruneio.svg?branch=master)](https://travis-ci.org/pelletier/go-buffruneio)
4[![GoDoc](https://godoc.org/github.com/pelletier/go-buffruneio?status.svg)](https://godoc.org/github.com/pelletier/go-buffruneio)
5
6Buffruneio is a wrapper around bufio to provide buffered runes access with
7unlimited unreads.
8
9```go
10import "github.com/pelletier/go-buffruneio"
11```
12
13## Examples
14
15```go
16import (
17    "fmt"
18    "github.com/pelletier/go-buffruneio"
19    "strings"
20)
21
22reader := buffruneio.NewReader(strings.NewReader("abcd"))
23fmt.Println(reader.ReadRune()) // 'a'
24fmt.Println(reader.ReadRune()) // 'b'
25fmt.Println(reader.ReadRune()) // 'c'
26reader.UnreadRune()
27reader.UnreadRune()
28fmt.Println(reader.ReadRune()) // 'b'
29fmt.Println(reader.ReadRune()) // 'c'
30```
31
32## Documentation
33
34The documentation and additional examples are available at
35[godoc.org](http://godoc.org/github.com/pelletier/go-buffruneio).
36
37## Contribute
38
39Feel free to report bugs and patches using GitHub's pull requests system on
40[pelletier/go-toml](https://github.com/pelletier/go-buffruneio). Any feedback is
41much appreciated!
42
43## LICENSE
44
45Copyright (c) 2016 Thomas Pelletier
46
47Permission is hereby granted, free of charge, to any person obtaining a copy of
48this software and associated documentation files (the "Software"), to deal in
49the Software without restriction, including without limitation the rights to
50use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
51the Software, and to permit persons to whom the Software is furnished to do so,
52subject to the following conditions:
53
54The above copyright notice and this permission notice shall be included in all
55copies or substantial portions of the Software.
56
57THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
59FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
60COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
61IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
62CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
63