Home | History | Annotate | Download | only in big

Lines Matching full:base

21 // Text returns the string representation of x in the given base.
22 // Base must be between 2 and 36, inclusive. The result uses the
23 // lower-case letters 'a' to 'z' for digit values >= 10. No base
25 func (x *Int) Text(base int) string {
29 return string(x.abs.itoa(x.neg, base))
33 // x.Text(base), to buf and returns the extended buffer.
34 func (x *Int) Append(buf []byte, base int) []byte {
38 return append(buf, x.abs.itoa(x.neg, base)...)
69 // determine base
70 var base int
73 base = 2
75 base = 8
77 base = 10
79 base = 16
102 // determine prefix characters for indicating output base
115 digits := x.abs.utoa(base)
167 // read from r representing a signed integer number in a given conversion base.
168 // It returns z, the actual conversion base used, and an error, if any. In the
172 // The base argument must be 0 or a value from 2 through MaxBase. If the base
173 // is 0, the string prefix determines the actual conversion base. A prefix of
174 // ``0x'' or ``0X'' selects base 16; the ``0'' prefix selects base 8, and a
175 // ``0b'' or ``0B'' prefix selects base 2. Otherwise the selected base is 10.
177 func (z *Int) scan(r io.ByteScanner, base int) (*Int, int, error) {
185 z.abs, base, _, err = z.abs.scan(r, base, false)
187 return nil, base, err
191 return z, base, nil
235 base := 0
238 base = 2
240 base = 8
242 base = 10
244 base = 16
246 // let scan determine the base
250 _, _, err := z.scan(byteReader{s}, base)