A type that can represent a string as a collection of characters.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
protocol StringProtocol where Self.Element == Character, Self.Index == String.Index, Self.StringInterpolation == DefaultStringInterpolation , Self.SubSequence : StringProtocol
Overview
Do not declare new conformances to String
. Only the String
and Substring
types in the standard library are valid conforming types.