EncodingConversionOptions
struct EncodingConversionOptions
struct EncodingConversionOptions
import Foundation
class NSString
override convenience init()
convenience init?(bytes: UnsafeRawPointer, length len: Int, encoding: UInt)
convenience init?(bytesNoCopy bytes: UnsafeMutableRawPointer, length len: Int, encoding: UInt, freeWhenDone freeBuffer: Bool)
convenience init?(cString nullTerminatedCString: UnsafePointer<Int8>, encoding: UInt)
init(characters: UnsafePointer<unichar>, length: Int)
convenience init(charactersNoCopy characters: UnsafeMutablePointer<unichar>, length: Int, freeWhenDone freeBuffer: Bool)
required convenience init?(coder aDecoder: NSCoder)
convenience init(contentsOf url: URL, encoding enc: UInt) throws
convenience init(contentsOf url: URL, usedEncoding enc: UnsafeMutablePointer<UInt>?) throws
convenience init(contentsOfFile path: String, encoding enc: UInt) throws
convenience init(contentsOfFile path: String, usedEncoding enc: UnsafeMutablePointer<UInt>?) throws
convenience init?(data: Data, encoding: UInt)
required convenience init(extendedGraphemeClusterLiteral value: StaticString)
convenience init(format: NSString, _ args: any CVarArg...)
convenience init(format: String, arguments argList: CVaListPointer)
convenience init(format: String, locale: AnyObject?, arguments argList: CVaListPointer)
required convenience init(string aString: String)
required init(stringLiteral value: StaticString)
required convenience init(unicodeScalarLiteral value: StaticString)
convenience init?(utf8String nullTerminatedCString: UnsafePointer<Int8>)
static var supportsSecureCoding: Bool { get }
static func path(withComponents components: [String]) -> String
class var availableStringEncodings: UnsafePointer<UInt> { get }
class var defaultCStringEncoding: UInt { get }
class func localizedName(of encoding: UInt) -> String
var boolValue: Bool { get }
var capitalized: String { get }
var decomposedStringWithCanonicalMapping: String { get }
var decomposedStringWithCompatibilityMapping: String { get }
var deletingLastPathComponent: String { get }
var deletingPathExtension: String { get }
override var description: String { get }
var doubleValue: Double { get }
var expandingTildeInPath: String { get }
var fastestEncoding: UInt { get }
var fileSystemRepresentation: UnsafePointer<Int8> { get }
var floatValue: Float { get }
override var hash: Int { get }
var intValue: Int32 { get }
var integerValue: Int { get }
var isAbsolutePath: Bool { get }
var lastPathComponent: String { get }
var length: Int { get }
var localizedCapitalized: String { get }
var localizedLowercase: String { get }
var localizedUppercase: String { get }
var longLongValue: Int64 { get }
var lowercased: String { get }
var pathComponents: [String] { get }
var pathExtension: String { get }
var precomposedStringWithCanonicalMapping: String { get }
var precomposedStringWithCompatibilityMapping: String { get }
var removingPercentEncoding: String? { get }
var resolvingSymlinksInPath: String { get }
var smallestEncoding: UInt { get }
var standardizingPath: String { get }
var uppercased: String { get }
var utf8String: UnsafePointer<Int8>? { get }
static func < (lhs: NSString, rhs: NSString) -> Bool
func addingPercentEncoding(withAllowedCharacters allowedCharacters: CharacterSet) -> String?
func appending(_ aString: String) -> String
func appendingPathComponent(_ str: String) -> String
func appendingPathExtension(_ str: String) -> String?
func applyingTransform(_ transform: StringTransform, reverse: Bool) -> String?
func cString(using encoding: UInt) -> UnsafePointer<Int8>?
func canBeConverted(to encoding: UInt) -> Bool
func capitalized(with locale: Locale?) -> String
func caseInsensitiveCompare(_ string: String) -> ComparisonResult
func character(at index: Int) -> unichar
func commonPrefix(with str: String, options mask: NSString.CompareOptions = []) -> String
func compare(_ string: String) -> ComparisonResult
func compare(_ string: String, options mask: NSString.CompareOptions) -> ComparisonResult
func compare(_ string: String, options mask: NSString.CompareOptions, range compareRange: NSRange) -> ComparisonResult
func compare(_ string: String, options mask: NSString.CompareOptions, range compareRange: NSRange, locale: Any?) -> ComparisonResult
func completePath(into outputName: inout String?, caseSensitive flag: Bool, matchesInto outputArray: inout [String], filterTypes: [String]?) -> Int
func components(separatedBy separator: CharacterSet) -> [String]
func components(separatedBy separator: String) -> [String]
func contains(_ str: String) -> Bool
override func copy() -> Any
func copy(with zone: NSZone? = nil) -> Any
func data(using encoding: UInt) -> Data?
func data(using encoding: UInt, allowLossyConversion lossy: Bool = false) -> Data?
func encode(with aCoder: NSCoder)
func enumerateLines(_ block: (String, UnsafeMutablePointer<ObjCBool>) -> Void)
func enumerateSubstrings(in range: NSRange, options opts: NSString.EnumerationOptions = [], using block: (String?, NSRange, NSRange, UnsafeMutablePointer<ObjCBool>) -> Void)
func folding(options: NSString.CompareOptions = [], locale: Locale?) -> String
func getBytes(_ buffer: UnsafeMutableRawPointer?, maxLength maxBufferCount: Int, usedLength usedBufferCount: UnsafeMutablePointer<Int>?, encoding: UInt, options: NSString.EncodingConversionOptions = [], range: NSRange, remaining leftover: NSRangePointer?) -> Bool
func getCString(_ buffer: UnsafeMutablePointer<Int8>, maxLength maxBufferCount: Int, encoding: UInt) -> Bool
func getCharacters(_ buffer: UnsafeMutablePointer<unichar>, range: NSRange)
func getFileSystemRepresentation(_ cname: UnsafeMutablePointer<Int8>, maxLength max: Int) -> Bool
func getLineStart(_ startPtr: UnsafeMutablePointer<Int>?, end lineEndPtr: UnsafeMutablePointer<Int>?, contentsEnd contentsEndPtr: UnsafeMutablePointer<Int>?, for range: NSRange)
func getParagraphStart(_ startPtr: UnsafeMutablePointer<Int>?, end parEndPtr: UnsafeMutablePointer<Int>?, contentsEnd contentsEndPtr: UnsafeMutablePointer<Int>?, for range: NSRange)
func hasPrefix(_ str: String) -> Bool
func hasSuffix(_ str: String) -> Bool
override func isEqual(_ object: Any?) -> Bool
func isEqual(to aString: String) -> Bool
func lengthOfBytes(using enc: UInt) -> Int
func lineRange(for range: NSRange) -> NSRange
func localizedCaseInsensitiveCompare(_ string: String) -> ComparisonResult
func localizedCaseInsensitiveContains(_ str: String) -> Bool
func localizedCompare(_ string: String) -> ComparisonResult
func localizedStandardCompare(_ string: String) -> ComparisonResult
func localizedStandardContains(_ str: String) -> Bool
func localizedStandardRange(of str: String) -> NSRange
func lowercased(with locale: Locale?) -> String
func maximumLengthOfBytes(using enc: UInt) -> Int
override func mutableCopy() -> Any
func mutableCopy(with zone: NSZone? = nil) -> Any
func padding(toLength newLength: Int, withPad padString: String, startingAt padIndex: Int) -> String
func paragraphRange(for range: NSRange) -> NSRange
func range(of searchString: String) -> NSRange
func range(of searchString: String, options mask: NSString.CompareOptions = []) -> NSRange
func range(of searchString: String, options mask: NSString.CompareOptions = [], range searchRange: NSRange) -> NSRange
func range(of searchString: String, options mask: NSString.CompareOptions = [], range searchRange: NSRange, locale: Locale?) -> NSRange
func rangeOfCharacter(from searchSet: CharacterSet) -> NSRange
func rangeOfCharacter(from searchSet: CharacterSet, options mask: NSString.CompareOptions = []) -> NSRange
func rangeOfCharacter(from searchSet: CharacterSet, options mask: NSString.CompareOptions = [], range searchRange: NSRange) -> NSRange
func rangeOfComposedCharacterSequence(at index: Int) -> NSRange
func rangeOfComposedCharacterSequences(for range: NSRange) -> NSRange
func replacingCharacters(in range: NSRange, with replacement: String) -> String
func replacingOccurrences(of target: String, with replacement: String) -> String
func replacingOccurrences(of target: String, with replacement: String, options: NSString.CompareOptions = [], range searchRange: NSRange) -> String
func stringsByAppendingPaths(_ paths: [String]) -> [String]
func substring(from: Int) -> String
func substring(to: Int) -> String
func substring(with range: NSRange) -> String
func trimmingCharacters(in set: CharacterSet) -> String
func uppercased(with locale: Locale?) -> String
func write(to url: URL, atomically useAuxiliaryFile: Bool, encoding enc: UInt) throws
func write(toFile path: String, atomically useAuxiliaryFile: Bool, encoding enc: UInt) throws
struct EnumerationOptions
typealias CompareOptions = String.CompareOptions
protocol Equatable
A type that can be compared for value equality.
protocol ExpressibleByArrayLiteral
A type that can be initialized using an array literal.
protocol OptionSet : RawRepresentable, SetAlgebra
A type that presents a mathematical set interface to a bit set.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
protocol SetAlgebra<Element> : Equatable, ExpressibleByArrayLiteral
A type that provides mathematical set operations.
init(rawValue: UInt)
static let allowLossy: NSString.EncodingConversionOptions
static let externalRepresentation: NSString.EncodingConversionOptions
let rawValue: UInt
init()
Creates an empty option set.
init<S>(_ sequence: S) where S : Sequence, Self.Element == S.Element
Creates a new set from a finite sequence of items.
init(arrayLiteral: Self.Element...)
Creates a set containing the elements of the given array literal.
var isEmpty: Bool { get }
A Boolean value that indicates whether the set has no elements.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func contains(_ member: Self) -> Bool
Returns a Boolean value that indicates whether a given element is a member of the option set.
mutating func formIntersection(_ other: Self)
Removes all elements of this option set that are not also present in the given set.
mutating func formSymmetricDifference(_ other: Self)
Replaces this set with a new set containing all elements contained in either this set or the given set, but not in both.
mutating func formUnion(_ other: Self)
Inserts the elements of another set into this option set.
@discardableResult mutating func insert(_ newMember: Self.Element) -> (inserted: Bool, memberAfterInsert: Self.Element)
Adds the given element to the option set if it is not already a member.
func intersection(_ other: Self) -> Self
Returns a new option set with only the elements contained in both this set and the given set.
func isDisjoint(with other: Self) -> Bool
Returns a Boolean value that indicates whether the set has no members in common with the given set.
func isStrictSubset(of other: Self) -> Bool
Returns a Boolean value that indicates whether this set is a strict subset of the given set.
func isStrictSuperset(of other: Self) -> Bool
Returns a Boolean value that indicates whether this set is a strict superset of the given set.
func isSubset(of other: Self) -> Bool
Returns a Boolean value that indicates whether the set is a subset of another set.
func isSuperset(of other: Self) -> Bool
Returns a Boolean value that indicates whether the set is a superset of the given set.
@discardableResult mutating func remove(_ member: Self.Element) -> Self.Element?
Removes the given element and all elements subsumed by it.
mutating func subtract(_ other: Self)
Removes the elements of the given set from this set.
func subtracting(_ other: Self) -> Self
Returns a new set containing the elements of this set that do not occur in the given set.
func symmetricDifference(_ other: Self) -> Self
Returns a new option set with the elements contained in this set or in the given set, but not in both.
func union(_ other: Self) -> Self
Returns a new option set of the elements contained in this set, in the given set, or in both.
@discardableResult mutating func update(with newMember: Self.Element) -> Self.Element?
Inserts the given element into the set.