Charles Iliya Krempeaux ae00f4e838 | ||
---|---|---|
LICENSE | ||
README.md | ||
doc.go | ||
errors.go | ||
format.go | ||
format_test.go | ||
invalidutf8.go | ||
nilreader.go | ||
nilwriter.go | ||
readrune.go | ||
readrune_test.go | ||
runeerror.go | ||
runelength.go | ||
runelength_test.go | ||
runereader.go | ||
runereader_test.go | ||
runescanner.go | ||
runescanner_test.go | ||
runewriter.go | ||
runewriter_test.go | ||
writerune.go | ||
writerune_test.go |
README.md
go-utf8
Package utf8 provides tools for working with Unicode encoded as UTF-8, for the Go programming language.
Documention
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-utf8
Example
var reader io.Reader
// ...
r, n, err := utf8.ReadRune(reader)
var writer io.Writer
// ...
var r rune
// ...
n, err := utf8.WriteRune(w, r)
var reader io.Reader
// ...
runeReader := utf8.NewRuneReader(reader)
// ...
r, n, err := runeReader.ReadRune()
var reader io.Reader
// ...
runeScanner := utf8.NewRuneScanner(reader)
// ...
r, n, err := runeScanner.ReadRune()
// ...
err = runeScanner.UnreadRune()