Lines Matching full:base
7 // FormatUint returns the string representation of i in the given base,
8 // for 2 <= base <= 36. The result uses the lower-case letters 'a' to 'z'
10 func FormatUint(i uint64, base int) string {
11 _, s := formatBits(nil, i, base, false, false)
15 // FormatInt returns the string representation of i in the given base,
16 // for 2 <= base <= 36. The result uses the lower-case letters 'a' to 'z'
18 func FormatInt(i int64, base int) string {
19 _, s := formatBits(nil, uint64(i), base, i < 0, false)
30 func AppendInt(dst []byte, i int64, base int) []byte {
31 dst, _ = formatBits(dst, uint64(i), base, i < 0, true)
37 func AppendUint(dst []byte, i uint64, base int) []byte {
38 dst, _ = formatBits(dst, i, base, false, true)
54 // formatBits computes the string representation of u in the given base.
60 func formatBits(dst []byte, u uint64, base int, neg, append_ bool) (d []byte, s string) {
61 if base < 2 || base > len(digits) {
62 panic("strconv: illegal AppendInt/FormatInt base")
64 // 2 <= base && base <= len(digits)
66 var a [64 + 1]byte // +1 for sign of 64bit value in base 2
74 if base == 10 {
104 } else if s := shifts[base]; s > 0 {
105 // base is power of 2: use shifts and masks instead of / and %
106 b := uint64(base)
113 // u < base
119 b := uint64(base)
126 // u < base