// toLen returns the length of string s.
422746
func toLen(s string, args ...string) string {
	return strconv.Itoa(len(s))
}
1098295
func (s builderStack) Tos() (ValueLength, int) {
	//	_s := *s
	l := len(s.stack)
	if l > 0 {
		return (s.stack)[l-1], l
	}
	return 0, 0
}
1323730
func (ds *DestSme) Len() int {
	return ds.Flag.Len() + ds.Ton.Len() + ds.Npi.Len() + ds.DestAddr.Len()
}
201678
func (b *PackBuffer) ReadLen() int {
	if b.w >= len(b.s) {
		return 0
	}
	return (b.w - b.r)
}
1151573
func SharedPrefixLen(a, b []byte) int {
	i, n := 0, len(a)
	if n > len(b) {
		n = len(b)
	}
	for i < n && a[i] == b[i] {
		i++
	}
	return i
}
901429
func (vs *VertexSlice) SetLen(len int) {
	vs.End() // vs must have been Begin-ed before calling this method
	*vs = vs.grow(len)
	vs.Begin()
}
750293
func (r *Reference) SetLen(l int) error {
	if !validLen(l) {
		return errors.New("sam: length out of range")
	}
	r.lRef = int32(l)
	return nil
}
122915
func (path *Path) GetAsPathLen() int {

	var length int = 0
	if aspath := path.GetAsPath(); aspath != nil {
		for _, as := range aspath.Value {
			length += as.ASLen()
		}
	}
	return length
}
269742
func (ns *Namespace) ToLower(s interface{}) (string, error) {
	ss, err := cast.ToStringE(s)
	if err != nil {
		return "", err
	}

	return _strings.ToLower(ss), nil
}
1365368
func (enc *Encoding) EncodedLen(n int) int {
	if enc.padChar == NoPadding {
		return (n*8 + 5) / 6 // minimum # chars at 6 bits per char
	}
	return (n + 2) / 3 * 4 // minimum # 4-char quanta, 3 bytes each
}
1260673
func (v Value) ToString() string {
	if v.typ == Expression {
		return ""
	}
	return hack.String(v.val)
}
1259191
func (td *TrianglesData) SetLen(len int) {
	if len > td.Len() {
		needAppend := len - td.Len()
		for i := 0; i < needAppend; i++ {
			*td = append(*td, zeroValueTriangleData)
		}
	}
	if len < td.Len() {
		*td = (*td)[:len]
	}
}
111516
func (inputSet StringSet) ToList() []string {
	returnList := make([]string, 0, len(inputSet))
	for key, _ := range inputSet {
		returnList = append(returnList, key)
	}
	return returnList
}
277445
func ToJSON(in interface{}) (string, error) {
	s, err := toJSONBytes(in)
	if err != nil {
		return "", err
	}
	return string(s), nil
}
1276484
func (s stringSet) maxLen() int {
	if len(s) == 0 {
		return 0
	}
	m := len(s[0])
	for _, str := range s {
		if m < len(str) {
			m = len(str)
		}
	}
	return m
}
800881
func (d *Decoder) VarLen() (val uint32, readBytes uint32, err error) {
	buf := []byte{}
	var lastByte bool
	var n uint32

	for !lastByte {
		b, err := d.ReadByte()
		if err != nil {
			return 0, n, err
		}
		buf = append(buf, b)
		lastByte = (b>>7 == 0x0)
		n++
	}

	val, nUsed := DecodeVarint(buf)
	return val, uint32(nUsed), nil
}
115936
func (p Proc) FileDescriptorsLen() (int, error) {
	fds, err := p.fileDescriptors()
	if err != nil {
		return 0, err
	}

	return len(fds), nil
}