Lines Matching defs:String
5 // This file implements rat-to-string conversion functions.
34 if _, ok := z.SetString(string(tok)); !ok {
42 // optionally followed by an exponent. The entire string (not just a prefix)
45 func (z *Rat) SetString(s string) (*Rat, bool) {
61 // entire string must have been consumed
199 exp, err = strconv.ParseInt(string(digits), 10, 64)
203 // String returns a string representation of x in the form "a/b" (even if b == 1).
204 func (x *Rat) String() string {
213 return string(buf)
216 // RatString returns a string representation of x in the form "a/b" if b != 1,
218 func (x *Rat) RatString() string {
220 return x.a.String()
222 return x.String()
225 // FloatString returns a string representation of x in decimal form with prec
228 func (x *Rat) FloatString(prec int) string {
239 return string(buf)
277 return string(buf)