mirror of
https://github.com/apple/swift-http-structured-headers
synced 2026-11-22 04:30:40 +00:00
Motivation: RFC 9651 added the Display String Structured Type. Modifications: Implement the parser and serializer for Display String in the RawStructuredFieldValues module. Result: The RawStructuredFieldValues module will support the Display String type.
57 lines
2.1 KiB
Swift
57 lines
2.1 KiB
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftNIO open source project
|
|
//
|
|
// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
let asciiSpace = UInt8(ascii: " ")
|
|
let asciiTab = UInt8(ascii: "\t")
|
|
let asciiOpenParenthesis = UInt8(ascii: "(")
|
|
let asciiCloseParenthesis = UInt8(ascii: ")")
|
|
let asciiDash = UInt8(ascii: "-")
|
|
let asciiUnderscore = UInt8(ascii: "_")
|
|
let asciiZero = UInt8(ascii: "0")
|
|
let asciiOne = UInt8(ascii: "1")
|
|
let asciiNine = UInt8(ascii: "9")
|
|
let asciiDigits = asciiZero...asciiNine
|
|
let asciiDquote = UInt8(ascii: "\"")
|
|
let asciiColon = UInt8(ascii: ":")
|
|
let asciiSemicolon = UInt8(ascii: ";")
|
|
let asciiBackslash = UInt8(ascii: "\\")
|
|
let asciiQuestionMark = UInt8(ascii: "?")
|
|
let asciiExclamationMark = UInt8(ascii: "!")
|
|
let asciiAt = UInt8(ascii: "@")
|
|
let asciiOctothorpe = UInt8(ascii: "#")
|
|
let asciiDollar = UInt8(ascii: "$")
|
|
let asciiPercent = UInt8(ascii: "%")
|
|
let asciiAmpersand = UInt8(ascii: "&")
|
|
let asciiSquote = UInt8(ascii: "'")
|
|
let asciiCaret = UInt8(ascii: "^")
|
|
let asciiBacktick = UInt8(ascii: "`")
|
|
let asciiPipe = UInt8(ascii: "|")
|
|
let asciiTilde = UInt8(ascii: "~")
|
|
let asciiAsterisk = UInt8(ascii: "*")
|
|
let asciiEqual = UInt8(ascii: "=")
|
|
let asciiPlus = UInt8(ascii: "+")
|
|
let asciiSlash = UInt8(ascii: "/")
|
|
let asciiPeriod = UInt8(ascii: ".")
|
|
let asciiComma = UInt8(ascii: ",")
|
|
let asciiCapitalA = UInt8(ascii: "A")
|
|
let asciiCapitalF = UInt8(ascii: "F")
|
|
let asciiCapitalZ = UInt8(ascii: "Z")
|
|
let asciiLowerA = UInt8(ascii: "a")
|
|
let asciiLowerF = UInt8(ascii: "f")
|
|
let asciiLowerZ = UInt8(ascii: "z")
|
|
let asciiCapitals = asciiCapitalA...asciiCapitalZ
|
|
let asciiLowercases = asciiLowerA...asciiLowerZ
|
|
let asciiHexCapitals = asciiCapitalA...asciiCapitalF
|
|
let asciiHexLowercases = asciiLowerA...asciiLowerF
|