<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTLineCreateTruncatedLine(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTLineCreateTruncatedLine"
  },
  "title" : "CTLineCreateTruncatedLine(_:_:_:_:)"
}
-->

# CTLineCreateTruncatedLine(_:_:_:_:)

Creates a truncated line from an existing line.

```
func CTLineCreateTruncatedLine(_ line: CTLine, _ width: Double, _ truncationType: CTLineTruncationType, _ truncationToken: CTLine?) -> CTLine?
```

## Parameters

`line`

The line from which to create a truncated line.

`width`

The width at which truncation begins. The line is truncated if its width is greater than the width passed in this parameter.

`truncationType`

The type of truncation to perform if needed. See [`CTLineTruncationType`](/documentation/CoreText/CTLineTruncationType) for possible values.

`truncationToken`

This token is added at the point where truncation took place, to indicate that the line was truncated. Usually, the truncation token is the ellipsis character (`U+2026`). If this parameter is set to `NULL`, then no truncation token is used and the line is simply cut off.

## Return Value

A reference to a truncated CTLine object if the call was successful; otherwise, `NULL`.

## Discussion

The line specified in `truncationToken` should have a width less than the width specified by the `width` parameter. If the width of the line specified in `truncationToken` is greater than `width` and truncation is needed, the function returns `NULL`.

---

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)