StringProtocol
A type that can represent a string as a collection of characters.
protocol StringProtocol : BidirectionalCollection, Comparable, ExpressibleByStringInterpolation, Hashable, LosslessStringConvertible, TextOutputStream, TextOutputStreamable where Self.Element == Character, Self.Index == String.Index, Self.StringInterpolation == DefaultStringInterpolation, Self.SubSequence : StringProtocol
Overview
Do not declare new conformances to StringProtocol
. Only the String
and Substring
types in the standard library are valid conforming types.