Skip to content

Commit d3df05c

Browse files
committed
[stdlib] String.Index: Remove custom printing
1 parent bbb0048 commit d3df05c

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

stdlib/public/core/StringIndex.swift

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -516,37 +516,3 @@ extension String.Index: Hashable {
516516
hasher.combine(orderingValue)
517517
}
518518
}
519-
520-
// FIXME: This is for debugging only; remove before merging.
521-
extension String.Index {
522-
@_alwaysEmitIntoClient
523-
@inline(never)
524-
public var description: String {
525-
var d = "String.Index("
526-
d += "offset: \(_encodedOffset)"
527-
if transcodedOffset != 0 {
528-
d += "+\(transcodedOffset)"
529-
}
530-
531-
d += ", encoding: "
532-
switch (_rawBits & Self.__utf8Bit != 0, _rawBits & Self.__utf16Bit != 0) {
533-
case (false, false): d += "unknown"
534-
case (true, false): d += "utf8"
535-
case (false, true): d += "utf16"
536-
case (true, true): d += "any"
537-
}
538-
if _isCharacterAligned {
539-
d += ", aligned: character"
540-
} else if _isScalarAligned {
541-
d += ", aligned: scalar"
542-
}
543-
if let stride = characterStride {
544-
d += ", stride: \(stride)"
545-
}
546-
d += ")"
547-
return d
548-
}
549-
}
550-
551-
@available(SwiftStdlib 5.7, *)
552-
extension String.Index: CustomStringConvertible {}

0 commit comments

Comments
 (0)