Standard library / io
io.RuneReader
Reads one UTF-8 rune plus byte width and error. Expected stdout: 'é 2 <nil>\n'.
Formal Syntax & Structure
go syntaxgo
type RuneReader interface { ReadRune() (r rune, size int, err error)}Working Example
Example Snippetgo
package main
import ( "fmt" "io" "strings")
func main() { var r io.RuneReader = strings.NewReader("é") c, n, e := r.ReadRune() fmt.Println(string(c), n, e)}