One Logo Pool Ball
AppIntents · IOS API REFERENCE

NegativeAppShortcutPhrase.StringInterpolation

struct · iOS 17.0+ · SDK 27.1

struct StringInterpolation

A string you construct using literal values, content from intent parameters, and other interpolated values.

Members (3)

method · iOS 17.0+

appendInterpolation

TypeScript
appendInterpolation(token: AppShortcutPhraseToken): void
Swift declaration
mutating func appendInterpolation(_ token: AppShortcutPhraseToken)
method · iOS 17.0+

appendLiteral

TypeScript
appendLiteral(literal: string): void
Swift declaration
mutating func appendLiteral(_ literal: String)

Appends a literal segment to the interpolation. Don't call this method directly. Instead, initialize a variable or constant using a string literal with interpolated expressions. Interpolated expressions don't pass through this method; instead, Swift selects an overload of `appendInterpolation`. For more information, see the top-level `StringInterpolationProtocol` documentation. - Parameter literal: A string literal containing the characters that appear next in the string literal.

init · iOS 17.0+

init

TypeScript
static init(literalCapacity: number, interpolationCount: number): NegativeAppShortcutPhrase_StringInterpolation
Swift declaration
init(literalCapacity: Int, interpolationCount: Int)

Creates an empty instance ready to be filled with string literal content. Don't call this initializer directly. Instead, initialize a variable or constant using a string literal with interpolated expressions. Swift passes this initializer a pair of arguments specifying the size of the literal segments and the number of interpolated segments. Use this information to estimate the amount of storage you will need. - Parameter literalCapacity: The approximate size of all literal segments combined. This is meant to be passed to `String.reserveCapacity(_:)`; it may be slightly larger or smaller than the sum of the counts of each literal segment. - Parameter interpolationCount: The number of interpolations which will be appended. Use this value to estimate how much additional capacity will be needed for the interpolated segments.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →