StringInterpolation

public extension String.StringInterpolation

Add support for strings style with StringStyle constants.

  • Interpolates the given value’s textual representation with defined styles into the string literal being created.

    Do not call this method directly It is used by the compiler when interpreting string interpolations. Instead, use string interpolation to create a new string by including values, literals, variables, or expressions enclosed in parentheses, prefixed by a backslash \(…, style:).

    Declaration

    Swift

    mutating func appendInterpolation<S>(_ value: S, style: CLI.StringStyle...) where S : CustomStringConvertible

    Parameters

    value

    The value to be styled.

    style

    What styles to be apply to value.