// String generates a random string of the given size.
340091
func String(length int) string {
	return base64.RawStdEncoding.EncodeToString(Bytes(length))[:length]
}
1295463
func (p *Poller) String() string {
	str := make([]string, 0)
	for i, poll := range p.items {
		str = append(str, fmt.Sprintf("%v%v", p.socks[i], State(poll.events)))
	}
	return fmt.Sprint("Poller", str)
}
851557
func (r Result) String() string {
	switch r {
	case None:
		return "none"
	case Neutral:
		return "neutral"
	case Pass:
		return "pass"
	case Fail:
		return "fail"
	case Softfail:
		return "softfail"
	case Temperror:
		return "temperror"
	case Permerror:
		return "permerror"
	default:
		return strconv.Itoa(int(r))
	}
}
528955
func RandString(a []string) string {
	size := len(a)
	if size == 0 {
		return ""
	}
	return a[rand.Intn(size)]
}
532280
func (a Atom) String() string {
	start := uint32(a >> 8)
	n := uint32(a & 0xff)
	if start+n > uint32(len(atomText)) {
		return ""
	}
	return atomText[start : start+n]
}
307478
func (sf SizeFlag) String() string {
	// This happens when izZeroValue() from flag.go makes a zero
	// value from the type of a flag.
	if sf.v == nil {
		return "0"
	}
	v := *sf.v
	var suffix string
	const units = "kmgt"
	var c byte
	if v%1000 == 0 {
		for i := 0; v%1000 == 0 && i < len(units); i++ {
			c = units[i]
			v /= 1000
		}
		suffix = string(c)
	} else if v%1024 == 0 {
		for i := 0; v%1024 == 0 && i < len(units); i++ {
			c = units[i]
			v /= 1024
		}
		suffix = string(c) + "i"
	}
	return fmt.Sprintf("%d%s", v, suffix)
}
646952
func (a Amount) String() string {
	return strings.TrimRight(strings.TrimRight(a.FloatString(100), "0"), ".")
}
38069
func (hash Hash) String() string {
	for i := 0; i < HashSize/2; i++ {
		hash[i], hash[HashSize-1-i] = hash[HashSize-1-i], hash[i]
	}
	return hex.EncodeToString(hash[:])
}
986927
func Random(length int) (string, error) {
	if length == 0 {
		return "", nil
	}
	output := make([]byte, 0, length)

	// Request a bit more than length to reduce the chance
	// of needing more than one batch of random bytes
	batchSize := length + length/4

	for {
		buf, err := uuid.GenerateRandomBytes(batchSize)
		if err != nil {
			return "", err
		}

		for _, b := range buf {
			// Avoid bias by using a value range that's a multiple of 62
			if b < (csLen * 4) {
				output = append(output, charset[b%csLen])

				if len(output) == length {
					return string(output), nil
				}
			}
		}
	}
}
610184
func String(n int, letters ...string) string {
	var letterRunes []rune
	if len(letters) == 0 {
		letterRunes = defLetters
	} else {
		letterRunes = []rune(letters[0])
	}

	var bb bytes.Buffer
	bb.Grow(n)
	l := uint32(len(letterRunes))
	// on each loop, generate one random rune and append to output
	for i := 0; i < n; i++ {
		bb.WriteRune(letterRunes[binary.BigEndian.Uint32(Bytes(4))%l])
	}
	return bb.String()
}
1310599
func (d *MyDecimal) String() string {
	tmp := *d
	tmp.Round(&tmp, int(tmp.resultFrac))
	return string(tmp.ToString())
}
1143798
func String(length int) string {
	b := make([]rune, length)
	for i := range b {
		b[i] = letters[Intn(numLetters)]
	}
	return string(b)
}
246511
func (v *structV) String() string {
	res := "{"
	for i, v := range *v {
		if i > 0 {
			res += ", "
		}
		res += v.String()
	}
	return res + "}"
}
60727
func (s StorageSize) String() string {
	if s > 1048576 {
		return fmt.Sprintf("%.2f MiB", s/1048576)
	} else if s > 1024 {
		return fmt.Sprintf("%.2f KiB", s/1024)
	} else {
		return fmt.Sprintf("%.2f B", s)
	}
}
21044
func (s *ScanOp) String() string {
	result := &bytes.Buffer{}
	result.WriteString("ScanOp")
	addLimitTokenString(result, s.limit, s.token)
	return result.String()
}
92751
func GenerateRandomString(s int) (string, error) {
	b, err := GenerateRandomBytes(s)
	return base64.URLEncoding.EncodeToString(b), err
}
495565
func (c *Counter) String() string {
	var buf [16]byte
	v := strconv.AppendInt(buf[:0], c.val, 10)
	return c.desc.Name + ": " + string(v)
}