bufr/utils.go

16 lines
276 B
Go
Raw Normal View History

2022-04-19 14:35:10 +02:00
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)
}