improved docs

master
Charles Iliya Krempeaux 2018-07-02 01:36:39 -07:00
parent 03b9afa710
commit 4e0aa2bdc2
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@ import (
// ReadRune reads a single UTF-8 encoded Unicode character from an io.Reader, // ReadRune reads a single UTF-8 encoded Unicode character from an io.Reader,
// and returns the Unicode character (as a Go rune) and the number of bytes read. // and returns the Unicode character (as a Go rune) and the number of bytes read.
//
// Note that a single UTF-8 encoded Unicode character could be more than one byte.
//
// For example, the Unicode "≡" (IDENTICAL TO) character gets encoded using 3 bytes under UTF-8.
func ReadRune(reader io.Reader) (rune, int, error) { func ReadRune(reader io.Reader) (rune, int, error) {
if nil == reader { if nil == reader {
return 0, 0, errNilReader return 0, 0, errNilReader