MCPcopy
hub / github.com/pterm/pterm / Sprint

Method Sprint

basic_text_printer.go:33–38  ·  view source on GitHub ↗

Sprint formats using the default formats for its operands and returns the resulting string. Spaces are added between operands when neither is a string.

(a ...any)

Source from the content-addressed store, hash-verified

31// Sprint formats using the default formats for its operands and returns the resulting string.
32// Spaces are added between operands when neither is a string.
33func (p BasicTextPrinter) Sprint(a ...any) string {
34 if p.Style == nil {
35 p.Style = NewStyle()
36 }
37 return p.Style.Sprint(a...)
38}
39
40// Sprintln formats using the default formats for its operands and returns the resulting string.
41// Spaces are always added between operands and a newline is appended.

Callers 3

SprintlnMethod · 0.95
SprintfMethod · 0.95
PrintMethod · 0.95

Calls 2

NewStyleFunction · 0.85
SprintMethod · 0.65

Tested by

no test coverage detected