- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for UnreadRune (0.1 sec)
-
src/bytes/buffer.go
return r, n, nil } // UnreadRune unreads the last rune returned by [Buffer.ReadRune]. // If the most recent read or write operation on the buffer was // not a successful [Buffer.ReadRune], UnreadRune returns an error. (In this regard // it is stricter than [Buffer.UnreadByte], which will unread the last byte // from any read operation.) func (b *Buffer) UnreadRune() error { if b.lastRead <= opInvalid {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } // Check that UnreadRune works buf.Reset() // check at EOF if err := buf.UnreadRune(); err == nil { t.Fatal("UnreadRune at EOF: got no error") } if _, _, err := buf.ReadRune(); err == nil { t.Fatal("ReadRune at EOF: got no error") } if err := buf.UnreadRune(); err == nil { t.Fatal("UnreadRune after ReadRune at EOF: got no error") }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
src/bufio/bufio.go
b.lastRuneSize = size return r, size, nil } // UnreadRune unreads the last rune. If the most recent method called on // the [Reader] was not a [Reader.ReadRune], [Reader.UnreadRune] returns an error. (In this // regard it is stricter than [Reader.UnreadByte], which will unread the last byte // from any read operation.) func (b *Reader) UnreadRune() error { if b.lastRuneSize < 0 || b.r < b.lastRuneSize {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0)