Published release 0.2.1. Unreleased PR #2 reference.
LOOM 0.2.1 / TEXT, MARKDOWN, AND EDITING
TextWrapping
Grapheme or word wrapping. TextWrapOptions separately controls leading whitespace, long-word breaking, and tab expansion; explicit source newlines remain significant.
Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.
Example
let wrapping: TextWrapping = .word
_ = TextLayout("A longer sentence", width: 12, wrapping: wrapping)Members on this page
Feature guides and release status
TextWrapping
enum TextWrappingConforms to: Swift.Equatable, Swift.Hashable, Swift.Sendable, Swift.SendableMetatype.
How text moves to a new terminal row when it reaches the available cells.
Source · TextLayout.swift:4grapheme
case graphemeThe grapheme case. Associated values, if any, are shown in the declaration.
Source · TextLayout.swift:5word
case wordThe word case. Associated values, if any, are shown in the declaration.
Source · TextLayout.swift:6none
case noneOnly explicit newlines start rows; paint a viewport over the full lines.
Source · TextLayout.swift:8