<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/OSLogIntegerFormatting/octal(explicitPositiveSign:includePrefix:uppercase:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "s:2os22OSLogIntegerFormattingV5octal20explicitPositiveSign13includePrefix9uppercaseACSb_S2btFZ"
  },
  "title" : "octal(explicitPositiveSign:includePrefix:uppercase:)"
}
-->

# octal(explicitPositiveSign:includePrefix:uppercase:)

Creates a custom octal format that displays the exact number of digits in the number.

```
static func octal(explicitPositiveSign: Bool = false, includePrefix: Bool = false, uppercase: Bool = false) -> OSLogIntegerFormatting
```

## Parameters

`explicitPositiveSign`

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

`includePrefix`

A Boolean that indicates whether to include a leading `0o` for octal numbers.

`uppercase`

A Boolean value that indicates whether to uppercase numerals that are greater than 9.

## Return Value

A custom octal format for integers.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)