diff --git a/Sources/FoundationEssentials/ComparisonResult.swift b/Sources/_FoundationInternals/ComparisonResult.swift similarity index 100% rename from Sources/FoundationEssentials/ComparisonResult.swift rename to Sources/_FoundationInternals/ComparisonResult.swift diff --git a/Sources/FoundationEssentials/String/BidirectionalCollection.swift b/Sources/_FoundationInternals/String/BidirectionalCollection.swift similarity index 100% rename from Sources/FoundationEssentials/String/BidirectionalCollection.swift rename to Sources/_FoundationInternals/String/BidirectionalCollection.swift diff --git a/Sources/FoundationEssentials/String/BuiltInUnicodeScalarSet.swift b/Sources/_FoundationInternals/String/BuiltInUnicodeScalarSet.swift similarity index 100% rename from Sources/FoundationEssentials/String/BuiltInUnicodeScalarSet.swift rename to Sources/_FoundationInternals/String/BuiltInUnicodeScalarSet.swift diff --git a/Sources/FoundationEssentials/String/RegexPatternCache.swift b/Sources/_FoundationInternals/String/RegexPatternCache.swift similarity index 100% rename from Sources/FoundationEssentials/String/RegexPatternCache.swift rename to Sources/_FoundationInternals/String/RegexPatternCache.swift diff --git a/Sources/FoundationEssentials/String/String+Comparison.swift b/Sources/_FoundationInternals/String/String+Comparison.swift similarity index 99% rename from Sources/FoundationEssentials/String/String+Comparison.swift rename to Sources/_FoundationInternals/String/String+Comparison.swift index 972c53543..9995c534b 100644 --- a/Sources/FoundationEssentials/String/String+Comparison.swift +++ b/Sources/_FoundationInternals/String/String+Comparison.swift @@ -643,7 +643,7 @@ extension Substring { } // Only throws when using `.regularExpression` option - package func _enumerateComponents(separatedBy separator: Substring, options: String.CompareOptions, withBlock block: (_ component: Substring, _ isLastComponent: Bool) -> ()) throws { + func _enumerateComponents(separatedBy separator: Substring, options: String.CompareOptions = [], withBlock block: (_ component: Substring, _ isLastComponent: Bool) -> ()) throws { var searchStart = startIndex while searchStart < endIndex { let r = try self[searchStart...]._range(of: separator, options: options) diff --git a/Sources/FoundationEssentials/String/String+Internals.swift b/Sources/_FoundationInternals/String/String+Internals.swift similarity index 86% rename from Sources/FoundationEssentials/String/String+Internals.swift rename to Sources/_FoundationInternals/String/String+Internals.swift index 096406f9a..6e700714b 100644 --- a/Sources/FoundationEssentials/String/String+Internals.swift +++ b/Sources/_FoundationInternals/String/String+Internals.swift @@ -11,13 +11,13 @@ //===----------------------------------------------------------------------===// extension String { - package func _trimmingWhitespace() -> String { + internal func _trimmingWhitespace() -> String { String(unicodeScalars._trimmingCharacters { $0.properties.isWhitespace }) } - package init?(_utf16 input: UnsafeBufferPointer) { + internal init?(_utf16 input: UnsafeBufferPointer) { // Allocate input.count * 3 code points since one UTF16 code point may require up to three UTF8 code points when transcoded let str = withUnsafeTemporaryAllocation(of: UTF8.CodeUnit.self, capacity: input.count * 3) { contents in var count = 0 @@ -39,14 +39,14 @@ extension String { self = str } - package init?(_utf16 input: UnsafeMutableBufferPointer, count: Int) { + internal init?(_utf16 input: UnsafeMutableBufferPointer, count: Int) { guard let str = String(_utf16: UnsafeBufferPointer(rebasing: input[.., count: Int) { + internal init?(_utf16 input: UnsafePointer, count: Int) { guard let str = String(_utf16: UnsafeBufferPointer(start: input, count: count)) else { return nil } diff --git a/Sources/FoundationEssentials/String/UnicodeScalar.swift b/Sources/_FoundationInternals/String/UnicodeScalar.swift similarity index 100% rename from Sources/FoundationEssentials/String/UnicodeScalar.swift rename to Sources/_FoundationInternals/String/UnicodeScalar.swift