gitee.com/sy_183/go-common@v1.0.5-0.20231205030221-958cfe129b47/strings/string.go (about) 1 package strings 2 3 type CharEntry struct { 4 Index int 5 Char byte 6 } 7 8 func NewCharEntry(i int, ch byte) CharEntry { 9 return CharEntry{Index: i, Char: ch} 10 } 11 12 type RuneEntry struct { 13 Index int 14 Rune rune 15 } 16 17 func NewRuneEntry(i int, r rune) RuneEntry { 18 return RuneEntry{Index: i, Rune: r} 19 }