hex(explicitPositiveSign:includePrefix:uppercase:minDigits:)

hex(explicitPositiveSign:includePrefix:uppercase:minDigits:)

hex(explicitPositiveSign:includePrefix:uppercase:minDigits:) Type Method of OSLogIntegerFormatting Creates a custom hexidecimal format that includes a minimum number of digits.

static func hex(explicitPositiveSign: Bool = false, includePrefix: Bool = false, uppercase: 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.
  • includePrefix: A Boolean value that indicates whether to include a 0x prefix in front of the hexidecimal value.
  • uppercase: A Boolean value that indicates whether to uppercase numerals that are greater than 9.
  • minDigits: The minimum number of digits to display for the hexidecimal value. If the number of digits in the hexidecimal number is less than this value, the logging system adds leading zeros.

Return Value

A custom hexadecimal format for integers.