internal/protocol/lob.go
func (l *charLobChunkWriter) runeCount(b []byte) int {
	numChars := 0
	for len(b) > 0 {
		_, size := utf8.DecodeRune(b)
		b = b[size:]
		numChars++
		if size == utf8.UTFMax {
			numChars++
		}
	}
	return numChars
}
func (l *charLobChunkWriter) runeCount(b []byte) int {
	numChars := 0
	for len(b) > 0 {
		_, size := utf8.DecodeRune(b)
		b = b[size:]
		numChars++
		if size == utf8.UTFMax {
			numChars++
		}
	}
	return numChars
}
func ( l * charLobChunkWriter ) runeCount ( b [ ] byte ) int { numChars := 0 for len ( b ) > 0 { _ , size := utf8 . DecodeRune ( b ) b = b [ size : ] numChars ++ if size == utf8 . UTFMax { numChars ++ } } return numChars }
// Caution: hdb counts 4 byte utf-8 encodings (cesu-8 6 bytes) as 2 (3 byte) chars
Caution : hdb counts 4 byte utf - 8 encodings ( cesu - 8 6 bytes ) as 2 ( 3 byte ) chars