[stdlib] Adding the StringProtocol

This commit is contained in:
Max Moiseev
2017-04-28 18:32:42 -07:00
committed by Maxim Moiseev
parent bba33f345f
commit bfb1824f44
3 changed files with 42 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
extension String : RangeReplaceableCollection, BidirectionalCollection {
extension String : StringProtocol {
/// The index type for subscripting a string.
public typealias Index = CharacterView.Index