Swiftybase
Function StackUtility

Sprintf

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

Configuration:

  • Format: The format string that defines how the values will be formatted.
  • Value: The value(s) to be inserted into the format string.
  • Value As Literal: Check this as true when the provided value is a list of literal values.

Go Formatting Options

Go's Sprintf function supports a wide range of format specifiers, including:

  • %v: Default format (for any type).
  • %s: String format.
  • %d: Decimal integer format.
  • %f: Floating-point number format.
  • %x: Hexadecimal format.
  • %t: Boolean format.
  • %+v: Struct with field names.

Output

Returns the formatted output.

On this page