// Cellf is a simpler printf-style version of CellFormat with no fill, border,
// links or special alignment. See documentation for the fmt package for
// details on fmtStr and args.
432696
func (f *Fpdf) Cellf(w, h float64, fmtStr string, args ...interface{}) {
	f.CellFormat(w, h, sprintf(fmtStr, args...), "", 0, "L", false, 0, "")
}
1001700
func (gp *GoPdf) Cell(rectangle *Rect, text string) error {
	rectangle = rectangle.UnitsToPoints(gp.config.Unit)
	defaultopt := CellOption{
		Align:  Left | Top,
		Border: 0,
		Float:  Right,
	}

	err := gp.curr.Font_ISubset.AddChars(text)
	if err != nil {
		return err
	}
	err = gp.getContent().AppendStreamSubsetFont(rectangle, text, defaultopt)
	if err != nil {
		return err
	}

	return nil
}
1019225
func Docf(raw string, args ...interface{}) string {
	return fmt.Sprintf(Doc(raw), args...)
}
240080
func (guid GUID) Stringf(format Format) string {
	if format == "" {
		format = FormatDefault
	}
	fullFormat, present := knownFormats[format]
	if !present {
		return ""
	}
	return fmt.Sprintf(
		fullFormat,
		guid.timeLow,
		guid.timeMid,
		guid.timeHighAndVersion,
		guid.clockSeqHighAndReserved,
		guid.clockSeqLow,
		guid.node[0],
		guid.node[1],
		guid.node[2],
		guid.node[3],
		guid.node[4],
		guid.node[5])
}
349967
func errorPrintf(format string, a ...interface{}) string {
	s := fmt.Sprintf(format, a...)
	lines := strings.Split(s, "\n")
	for i := 1; i < len(lines); i++ {
		lines[i] = "  " + lines[i]
	}
	return strings.Join(lines, "\n")
}
1229164
func (c *Color) Printf(format string, args ...interface{}) {
	fmt.Fprintf(c.output, format, args...)
}
1307770
func fprintf(span cc.Span, format string, args ...interface{}) {
	msg := fmt.Sprintf(format, args...)
	fmt.Fprintf(os.Stderr, "%s:%d: %s\n", span.Start.File, span.Start.Line, msg)
}
1011020
func (t *Table) printCellValue(result io.Writer, transformer rowTransformer, col, last int, value string) error {
	value = trim(transformer.Transform(col, trim(value)))
	fmt.Fprint(result, value)

	// Pad all columns, but the last in this row (with the size of
	// the header row limiting this). This ensures that most of
	// the irrelevant spacing is not printed. At the moment
	// irrelevant spacing can only occur when printing a row with
	// multi-line cells, introducing a physical short line for a
	// long logical row. Getting rid of that requires fixing in
	// printRow.
	//
	//  Note how the inter-column spacing is also irrelevant for
	//  that last column.

	if col < last {
		// (**) See also 'calculateMaxSize' (cMS). Here and
		// there we have to apply identical transformations to
		// the cell value to get matching cell width
		// information. If they do not match then we may here
		// compute a cell width larger than the max width
		// found by cMS, derive a negative padding length from
		// that, and subsequently return an error. What was
		// further missing is trimming before entering the
		// user-transform. Especially with color transforms
		// any trailing space going in will not be removable
		// for print.
		//
		// This happened for
		// https://www.pivotaltracker.com/n/projects/892938/stories/117404629

		decolorizedLength, err := visibleSize(trim(Decolorize(value)))
		if err != nil {
			return err
		}
		padlen := t.columnWidth[col] - decolorizedLength
		padding := strings.Repeat(" ", padlen)
		fmt.Fprint(result, padding)
		fmt.Fprint(result, t.colSpacing)
	}
	return nil
}
446910
func Errorf(format string, v ...interface{}) {
	std.Fprint(std.flags, LEVEL_ERROR, 2, fmt.Sprintf(format, v...), nil)
}
1185612
func Wrapf(err error, format string, args ...interface{}) error {
	msg := fmt.Sprintf(format, args...)
	return Wrap(err, msg)
}
920861
func (r *Row) String() string {
	// get the max number of lines for each cell
	var lc int // line count
	for _, cell := range r.Cells {
		if clc := len(strings.Split(cell.String(), "\n")); clc > lc {
			lc = clc
		}
	}

	// allocate a two-dimentional array of cells for each line and add size them
	cells := make([][]*Cell, lc)
	for x := 0; x < lc; x++ {
		cells[x] = make([]*Cell, len(r.Cells))
		for y := 0; y < len(r.Cells); y++ {
			cells[x][y] = &Cell{Width: r.Cells[y].Width}
		}
	}

	// insert each line in a cell as new cell in the cells array
	for y, cell := range r.Cells {
		lines := strings.Split(cell.String(), "\n")
		for x, line := range lines {
			cells[x][y].Data = line
		}
	}

	// format each line
	lines := make([]string, lc)
	for x := range lines {
		line := make([]string, len(cells[x]))
		for y := range cells[x] {
			line[y] = cells[x][y].String()
		}
		lines[x] = strutil.Join(line, r.Separator)
	}
	return strutil.Join(lines, "\n")
}
326099
func (l *Logger) Errorf(format string, v ...interface{}) {
	if l.Level >= ErrorLevel {
		l.Logger.Print(ErrorLevel.String() + fmt.Sprintf(format, v...))
	}
}
1374798
func Errorf(status int, format string, v ...interface{}) (int, *ErrorResponse) {
	return Error(status, fmt.Sprintf(format, v...))
}
445860
func (w *Wrapper) Printf(format string, values ...interface{}) {
	fmt.Fprintf(w, format+"\t", values...)
}
327895
func (f *File) setCellIntFunc(sheet, axis string, value interface{}) error {
	var err error
	switch v := value.(type) {
	case int:
		err = f.SetCellInt(sheet, axis, v)
	case int8:
		err = f.SetCellInt(sheet, axis, int(v))
	case int16:
		err = f.SetCellInt(sheet, axis, int(v))
	case int32:
		err = f.SetCellInt(sheet, axis, int(v))
	case int64:
		err = f.SetCellInt(sheet, axis, int(v))
	case uint:
		err = f.SetCellInt(sheet, axis, int(v))
	case uint8:
		err = f.SetCellInt(sheet, axis, int(v))
	case uint16:
		err = f.SetCellInt(sheet, axis, int(v))
	case uint32:
		err = f.SetCellInt(sheet, axis, int(v))
	case uint64:
		err = f.SetCellInt(sheet, axis, int(v))
	}
	return err
}
1034471
func Printf(format string, a ...interface{}) (n int, errno error) {
	return fmt.Printf(format, wrap(a, false)...)
}
157531
func Errorf(format string, args ...interface{}) error {
	return &fundamental{
		msg:   fmt.Sprintf(format, args...),
		stack: callers(),
	}
}