MCPcopy
hub / github.com/pterm/pterm / Sprintf

Function Sprintf

print.go:28–30  ·  view source on GitHub ↗

Sprintf formats according to a format specifier and returns the resulting string.

(format string, a ...any)

Source from the content-addressed store, hash-verified

26
27// Sprintf formats according to a format specifier and returns the resulting string.
28func Sprintf(format string, a ...any) string {
29 return color.Sprintf(format, a...)
30}
31
32// Sprintfln formats according to a format specifier and returns the resulting string.
33// Spaces are always added between operands and a newline is appended.

Callers 15

TestRGB_PrintFunction · 0.92
TestRGB_PrintfFunction · 0.92
TestRGB_PrintlnFunction · 0.92
TestRGB_SprintFunction · 0.92
TestRGB_SprintlnFunction · 0.92
TestSprintfFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
TableFromStructSliceFunction · 0.92
SprintfMethod · 0.85

Calls 1

SprintfMethod · 0.65

Tested by 6

TestRGB_PrintFunction · 0.74
TestRGB_PrintfFunction · 0.74
TestRGB_PrintlnFunction · 0.74
TestRGB_SprintFunction · 0.74
TestRGB_SprintlnFunction · 0.74
TestSprintfFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…