Skip Navigation
Instance MethodMethod

swiftStringLiteral(_:)

Returns a Swift string literal for a single-line value.

func swiftStringLiteral(_ value: String) -> String

Parameters

value

The string to encode.

Return Value

The quoted literal with backslashes, quotes and control characters escaped.