12345678910111213141516171819 |
- package mahonia
- func FallbackDecoder(decoders ...Decoder) Decoder {
- return func(p []byte) (c rune, size int, status Status) {
- for _, d := range decoders {
- c, size, status = d(p)
- if status != INVALID_CHAR {
- return
- }
- }
- return 0, 1, INVALID_CHAR
- }
- }
|