16 lines
276 B
Go
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)
|
||
|
}
|