bufr/utils.go
2022-04-19 14:35:10 +02:00

16 lines
276 B
Go

package bufr
import (
"bufio"
"io"
"strings"
)
func prependString(str string, r io.Reader) *bufio.Reader {
return bufio.NewReader(io.MultiReader(strings.NewReader(str), r))
}
func prependRune(rn rune, r io.Reader) *bufio.Reader {
return prependString(string(rn), r)
}