utf8s.RuneScanner docs

master
Charles Iliya Krempeaux 2018-07-10 21:01:30 -07:00
parent 3f106d444c
commit e0bbe43401
2 changed files with 33 additions and 0 deletions

View File

@ -43,3 +43,19 @@ runeReader := utf8s.NewRuneReader(reader)
r, n, err := runeReader.ReadRune()
```
```go
var reader io.Reader
// ...
runeScanner := utf8s.NewRuneScanner(reader)
// ...
r, n, err := runeScanner.ReadRune()
// ...
err = runeScanner.UnreadRune()
```

17
doc.go
View File

@ -37,6 +37,23 @@ Example
r, n, err := runeReader.ReadRune()
Example
var reader io.Reader
// ...
runeScanner := utf8s.NewRuneScanner(reader)
// ...
r, n, err := runeScanner.ReadRune()
// ...
err = runeScanner.UnreadRune()
Example
var r rune