func UInt8ToBytes()

in conv/uint.go [4:21]


func UInt8ToBytes(n uint8, buf *[3]byte) []byte {
	if n == 0 {
		return digits1[0]
	} else if n < 10 {
		return digits1[n]
	} else if n < 100 {
		return digits2[n]
	}
	n = n - 100
	if n < 100 {
		buf[0] = '1'
	} else {
		n = n - 100
		buf[0] = '2'
	}
	buf[1], buf[2] = digits2[n][0], digits2[n][1]
	return buf[0:]
}