<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManagerDelegate/layoutManager(_:shouldBreakLineByWordBeforeCharacterAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSLayoutManagerDelegate(im)layoutManager:shouldBreakLineByWordBeforeCharacterAtIndex:"
  },
  "title" : "layoutManager(_:shouldBreakLineByWordBeforeCharacterAt:)"
}
-->

# layoutManager(_:shouldBreakLineByWordBeforeCharacterAt:)

Asks the delegate whether to break the line at the specified word.

```
optional func layoutManager(_ layoutManager: NSLayoutManager, shouldBreakLineByWordBeforeCharacterAt charIndex: Int) -> Bool
```

## Parameters

`layoutManager`

The layout manager doing the layout.

`charIndex`

Index of the character delimiting the break point search.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the current line break point is acceptable; <doc://com.apple.documentation/documentation/Swift/false> if the layout manager should find the next break point opportunity before `charIndex`.

## Discussion

---

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)