// String prints current table to string.
422792
func (t *Table) String() string {
	if len(t.Data) == 0 {
		return "\n"
	}
	b := new(bytes.Buffer)
	max := func(p *int, v int) {
		if *p < v {
			*p = v
		}
	}
	lengths := make([]int, len(t.Data[0]))
	for _, v := range t.Data {
		for i, cell := range v {
			max(&lengths[i], len(cell))
		}
	}
	spc := []byte{' '}
	for _, v := range t.Data {
		for i, cell := range v {
			b.Write(t.CellConf[i].PadLeft)
			if t.CellConf[i].Align == Right {
				b.Write(bytes.Repeat(spc, lengths[i]-len(cell)))
			}
			b.WriteString(cell)
			if t.CellConf[i].Align == Left && i < len(v)-1 {
				b.Write(bytes.Repeat(spc, lengths[i]-len(cell)))
			}
			b.Write(t.CellConf[i].PadRight)
		}
		b.WriteString("\n")
	}
	return b.String()
}
401089
func (l *Literal) String() string {
	return fmt.Sprintf("\"%v\"^^type:%v", l.Interface(), l.Type())
}
517362
func (r Range) String() string {
	return fmt.Sprintf("(%v,%v)", r.Start, r.End)
}
341173
func (o *UlimitOpt) String() string {
	var out []string
	for _, v := range *o.values {
		out = append(out, v.String())
	}

	return fmt.Sprintf("%v", out)
}
994694
func (l Item) String() string {
	return fmt.Sprintf("%s (%q)", l.typ, l.val)
}
248858
func (ctx *Context) String(format string, args ...interface{}) *Context {
	fmt.Fprintf(ctx.Writer(), format, args...)
	return ctx
}
1167811
func (v *StructA) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	fields[i] = fmt.Sprintf("S: %v", v.S)
	i++

	return fmt.Sprintf("StructA{%v}", strings.Join(fields[:i], ", "))
}
387966
func (l Label) String() string {
	ret := "<label" + l.Attrs() + " for='" + l.For + "'>"
	ret += l.Text
	ret += "</label>"
	return ret
}
803504
func (fr FieldRow) String() string {
	return fmt.Sprintf("%s.%d.%s", fr.Field, fr.RowID, fr.RowKey)
}
275581
func (e *Edit) String() string {
	return fmt.Sprintf("%s: %v, %v, %v", e.command, e.args, e.bypassUndo, e.composite)
}
85923
func (i *Identifier) String() string {
	return fmt.Sprintf("%s: %T{Val: %q}", i.p, i, i.Val)
}
1310799
func (s *SchemaField) String() string {
	return fmt.Sprintf("[SchemaField: Name: %s, Doc: %s, Default: %v, Type: %s]", s.Name, s.Doc, s.Default, s.Type)
}
791291
func (s *stringSet) String() string {
	all := s.All()
	return fmt.Sprintf("%v", all)
}
207003
func (this Map) String() string {
	wr := bytes.NewBuffer(nil)
	fmt.Fprint(wr, "Map[")
	for k, v := range this {
		fmt.Fprintf(wr, "%v: %v", k, print(v))
	}
	fmt.Fprintf(wr, "]")
	return wr.String()
}
278377
func (t *Table) String() string {
	t.mtx.RLock()
	defer t.mtx.RUnlock()

	if len(t.Rows) == 0 {
		return ""
	}

	// determine the width for each column (cell in a row)
	var colwidths []uint
	for _, row := range t.Rows {
		for i, cell := range row.Cells {
			// resize colwidth array
			if i+1 > len(colwidths) {
				colwidths = append(colwidths, 0)
			}
			cellwidth := cell.LineWidth()
			if t.MaxColWidth != 0 && cellwidth > t.MaxColWidth {
				cellwidth = t.MaxColWidth
			}

			if cellwidth > colwidths[i] {
				colwidths[i] = cellwidth
			}
		}
	}

	var lines []string
	for _, row := range t.Rows {
		row.Separator = t.Separator
		for i, cell := range row.Cells {
			cell.Width = colwidths[i]
			cell.Wrap = t.Wrap
			cell.RightAlign = t.rightAlign[i]
		}
		lines = append(lines, row.String())
	}
	return strutil.Join(lines, "\n")
}
512839
func (t *TablePropNextTables) String() string {
	const text = "TablePropNextTables{Miss: %v, NextTables: %v}"
	return fmt.Sprintf(text, t.Miss, t.NextTables)
}
1343604
func (c *TableColumn) String() string {
	return fmt.Sprintf("{Name: '%v', Type: %v}", c.Name, c.Type)
}