Extension (Structure)swift-syntax 600.0.1all tags
String (ext)
You’re viewing third-party extensions to String
, a struct from the Swift standard library.
You can also read the documentation forString
itself.
extension String
You’re viewing third-party extensions to String
, a struct from the Swift standard library.
You can also read the documentation forString
itself.
extension String
@frozen struct String
A Unicode string value that is a collection of characters.
import SwiftSyntax
A library for working with Swift code.
init(syntaxText: SyntaxText)
Creates a String
from a SyntaxText
.
mutating func withSyntaxText<R>(_ body: (SyntaxText) throws -> R) rethrows -> R
Runs body
with a SyntaxText
that refers the contiguous memory of this string. Like String.withUTF8(_:)
, this may mutate the string if this string was not contiguous.
import SwiftParser
A parser for the Swift programming language.
func isValidSwiftIdentifier(for context: IdentifierCheckContext) -> Bool
Checks whether name
can be used as an identifier in a certain context.
import SwiftSyntaxBuilder
SwiftSyntaxBuilder is a tool for generating Swift code in a convenient way using result builders.
protocol ExpressibleByLiteralSyntax
A Swift type whose value can be represented directly in source code by a Swift literal.
func makeLiteralSyntax() -> StringLiteralExprSyntax
import _SwiftSyntaxGenericTestSupport
func trimmingTrailingWhitespace() -> String