StringProtocol
A type that can represent a string as a collection of characters.
Declaration
protocol StringProtocol : BidirectionalCollection, Comparable, ExpressibleByStringInterpolation, Hashable, LosslessStringConvertible, TextOutputStream, TextOutputStreamable where Self.Element == Character, Self.Index == String.Index, Self.StringInterpolation == DefaultStringInterpolation, Self.SubSequence : StringProtocolOverview
Do not declare new conformances to StringProtocol. Only the String and Substring types in the standard library are valid conforming types.
Topics
Operators
Associated Types
Initializers
Instance Properties
capitalizeddecomposedStringWithCanonicalMappingdecomposedStringWithCompatibilityMappingfastestEncodinghashlocalizedCapitalizedlocalizedLowercaselocalizedUppercaseprecomposedStringWithCanonicalMappingprecomposedStringWithCompatibilityMappingremovingPercentEncodingsmallestEncodingunicodeScalarsutf16utf8
Instance Methods
addingPercentEncoding(withAllowedCharacters:)addingPercentEscapes(using:)appending(_:)appendingFormat(_:_:)applyingTransform(_:reverse:)cString(using:)canBeConverted(to:)capitalized(with:)caseInsensitiveCompare(_:)commonPrefix(with:options:)compare(_:options:range:locale:)completePath(into:caseSensitive:matchesInto:filterTypes:)components(separatedBy:)components(separatedBy:)contains(_:)contains(_:)contains(_:)data(using:allowLossyConversion:)dataDetectorMatches(_:options:)enumerateLines(invoking:)enumerateLinguisticTags(in:scheme:options:orthography:invoking:)enumerateSubstrings(in:options:_:)folding(options:locale:)getBytes(_:maxLength:usedLength:encoding:options:range:remaining:)getCString(_:maxLength:encoding:)getLineStart(_:end:contentsEnd:for:)getParagraphStart(_:end:contentsEnd:for:)hasPrefix(_:)hasSuffix(_:)lengthOfBytes(using:)lineRange(for:)linguisticTags(in:scheme:options:orthography:tokenRanges:)localizedCaseInsensitiveCompare(_:)localizedCaseInsensitiveContains(_:)localizedCompare(_:)localizedStandardCompare(_:)localizedStandardContains(_:)localizedStandardRange(of:)lowercased()lowercased(with:)maximumLengthOfBytes(using:)padding(toLength:withPad:startingAt:)paragraphRange(for:)propertyList()propertyListFromStringsFileFormat()range(of:options:range:locale:)rangeOfCharacter(from:options:range:)rangeOfComposedCharacterSequence(at:)rangeOfComposedCharacterSequences(for:)replacingCharacters(in:with:)replacingOccurrences(of:with:options:range:)replacingPercentEscapes(using:)split(separator:maxSplits:omittingEmptySubsequences:)split(separator:maxSplits:omittingEmptySubsequences:)substring(from:)substring(to:)substring(with:)trimmingCharacters(in:)uppercased()uppercased(with:)withCString(_:)withCString(encodedAs:_:)write(to:atomically:encoding:)write(toFile:atomically:encoding:)