Contents

decimal(explicitPositiveSign:minDigits:)

Creates a decimal format with custom handling of the numerical sign and the minimum number of digits.

Declaration

static func decimal(explicitPositiveSign: Bool = false, minDigits: @autoclosure  @escaping () -> Int) -> OSLogIntegerFormatting

Parameters

  • explicitPositiveSign:

    A Boolean value that indicates whether to display a plus (+) sign in front of positive integers.

  • minDigits:

    The minimum number of digits to display for the integer. If the number of digits in the integer is less than this value, the logging system adds leading zeros.

Return Value

A custom decimal format for integers.

See Also

Creating a Custom Integer Format