@@ -25,17 +25,17 @@ public protocol StringProtocol
25
25
26
26
associatedtype UTF8View : /*Bidirectional*/Collection
27
27
where UTF8View. Element == UInt8 // Unicode.UTF8.CodeUnit
28
-
28
+
29
29
associatedtype UTF16View : BidirectionalCollection
30
30
where UTF16View. Element == UInt16 // Unicode.UTF16.CodeUnit
31
31
32
32
associatedtype UnicodeScalarView : BidirectionalCollection
33
33
where UnicodeScalarView. Element == Unicode . Scalar
34
-
34
+
35
35
var utf8 : UTF8View { get }
36
36
var utf16 : UTF16View { get }
37
37
var unicodeScalars : UnicodeScalarView { get }
38
-
38
+
39
39
#if _runtime(_ObjC)
40
40
func hasPrefix( _ prefix: String ) -> Bool
41
41
func hasSuffix( _ prefix: String ) -> Bool
@@ -63,7 +63,7 @@ public protocol StringProtocol
63
63
/// - Parameter nullTerminatedUTF8: A pointer to a sequence of contiguous,
64
64
/// UTF-8 encoded bytes ending just before the first zero byte.
65
65
init ( cString nullTerminatedUTF8: UnsafePointer < CChar > )
66
-
66
+
67
67
/// Creates a string from the null-terminated sequence of bytes at the given
68
68
/// pointer.
69
69
///
@@ -76,7 +76,7 @@ public protocol StringProtocol
76
76
init < Encoding: Unicode . Encoding > (
77
77
decodingCString nullTerminatedCodeUnits: UnsafePointer < Encoding . CodeUnit > ,
78
78
as sourceEncoding: Encoding . Type )
79
-
79
+
80
80
/// Calls the given closure with a pointer to the contents of the string,
81
81
/// represented as a null-terminated sequence of UTF-8 code units.
82
82
///
@@ -151,7 +151,7 @@ internal protocol _SwiftStringView {
151
151
/// A `String`, having the same contents as `self`, that may be unsuitable for
152
152
/// long-term storage.
153
153
var _ephemeralContent : String { get }
154
-
154
+
155
155
/// A `String`, having the same contents as `self`, that is suitable for
156
156
/// long-term storage.
157
157
//
@@ -206,8 +206,8 @@ extension String : _SwiftStringView {
206
206
@_versioned // FIXME(sil-serialize-all)
207
207
internal func _withCString<
208
208
Source : Collection ,
209
- SourceEncoding : Unicode . Encoding ,
210
- TargetEncoding : Unicode . Encoding ,
209
+ SourceEncoding : Unicode . Encoding ,
210
+ TargetEncoding : Unicode . Encoding ,
211
211
Result
212
212
> (
213
213
encodedAs targetEncoding: TargetEncoding . Type ,
@@ -227,8 +227,8 @@ where Source.Iterator.Element == SourceEncoding.CodeUnit {
227
227
@_semantics ( " optimize.sil.specialize.generic.partial.never " )
228
228
internal func _withCStringAndLength<
229
229
Source : Collection ,
230
- SourceEncoding : Unicode . Encoding ,
231
- TargetEncoding : Unicode . Encoding ,
230
+ SourceEncoding : Unicode . Encoding ,
231
+ TargetEncoding : Unicode . Encoding ,
232
232
Result
233
233
> (
234
234
encodedAs targetEncoding: TargetEncoding . Type ,
@@ -383,7 +383,7 @@ extension String {
383
383
repairIllFormedSequences: true )
384
384
self = result!
385
385
}
386
-
386
+
387
387
/// Creates a string from the null-terminated sequence of bytes at the given
388
388
/// pointer.
389
389
///
@@ -404,7 +404,7 @@ extension String {
404
404
)
405
405
self . init ( decoding: codeUnits, as: sourceEncoding)
406
406
}
407
-
407
+
408
408
/// Calls the given closure with a pointer to the contents of the string,
409
409
/// represented as a null-terminated sequence of code units.
410
410
///
@@ -1063,7 +1063,7 @@ extension String {
1063
1063
start: UnsafeMutablePointer < UTF8 . CodeUnit > ,
1064
1064
utf8CodeUnitCount: Int
1065
1065
) {
1066
- resultStorage. initialize ( to:
1066
+ resultStorage. initialize ( to:
1067
1067
String . _fromWellFormedCodeUnitSequence (
1068
1068
UTF8 . self,
1069
1069
input: UnsafeBufferPointer ( start: start, count: utf8CodeUnitCount) ) )
@@ -1356,7 +1356,7 @@ extension String {
1356
1356
return _nativeUnicodeUppercaseString ( self )
1357
1357
#endif
1358
1358
}
1359
-
1359
+
1360
1360
/// Creates an instance from the description of a given
1361
1361
/// `LosslessStringConvertible` instance.
1362
1362
@_inlineable // FIXME(sil-serialize-all)
0 commit comments