<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "OSLog",
  "identifier" : "/documentation/OSLog/OSLogMessageComponent/formatSubstring",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "OSLog"
    ],
    "preciseIdentifier" : "c:objc(cs)OSLogMessageComponent(py)formatSubstring"
  },
  "title" : "formatSubstring"
}
-->

# formatSubstring

The text immediately preceding a placeholder.

```
var formatSubstring: String { get }
```

## Discussion

The `formatSubstring` property can be an empty string if there is nothing between two placeholders, or if it is between the placeholder and the bounds of the string.

---

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)