Extension (Structure)vapor 4.106.7all 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 Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol AsyncRequestDecodable
Can convert Request
to a Self
.
protocol AsyncResponseEncodable
Can convert self
to a Response
.
protocol Content : Decodable, Encodable, AsyncRequestDecodable, AsyncResponseEncodable, RequestDecodable, ResponseEncodable
Convertible to / from content in an HTTP message.
protocol RequestDecodable
Can convert Request
to a Self
.
protocol ResponseEncodable
Can convert self
to a Response
.
static var defaultContentType: HTTPMediaType { get }
func base32Bytes() -> [UInt8]
func base32String() -> String
func base64Bytes() -> [UInt8]
func base64String() -> String
func bcryptBase64Bytes() -> [UInt8]
func bcryptBase64String() -> String
func encodeResponse(for request: Request) -> EventLoopFuture<Response>
func encodeResponse(for request: Request) async throws -> Response
func finished(with string: String) -> String
static var defaultContentType: HTTPMediaType { get }
static func decodeRequest(_ request: Request) -> EventLoopFuture<Self>
static func decodeRequest(_ request: Request) async throws -> Self
mutating func afterDecode() throws
mutating func beforeEncode() throws
func encodeResponse(status: HTTPStatus, headers: HTTPHeaders = [:], for request: Request) -> EventLoopFuture<Response>
Asynchronously encodes Self
into a Response
, setting the supplied status and headers.