You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@available(macOS, deprecated:10000, introduced:12, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
214
-
@available(iOS, deprecated:10000, introduced:15, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
215
-
@available(tvOS, deprecated:10000, introduced:15, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
216
-
@available(watchOS, deprecated:10000, introduced:8, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
217
-
@available(visionOS, deprecated:10000, introduced:1, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
212
+
@available(macOS, deprecated:26, introduced:12, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
213
+
@available(iOS, deprecated:26, introduced:15, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
214
+
@available(tvOS, deprecated:26, introduced:15, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
215
+
@available(watchOS, deprecated:26, introduced:8, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
216
+
@available(visionOS, deprecated:26, introduced:1, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
218
217
@available(*, deprecated, message:"AttributedString.Runs.Index should not be used as a Strideable and should instead be offset using the API provided by AttributedString.Runs")
219
218
extensionAttributedString.Runs.Index:Strideable{
220
219
publicfunc distance(to other:Self)->Int{
221
220
// This isn't perfect (since two non-sliced indices might have other sliced runs between them) but checking is better than nothing
222
221
precondition(!self._withinDiscontiguous && !other._withinDiscontiguous,"AttributedString.Runs.Index's Strideable conformance may not be used with discontiguous sliced runs")
223
222
return other._runOffset -self._runOffset
224
223
}
225
-
224
+
226
225
publicfunc advanced(by n:Int)->Self{
227
226
precondition(!self._withinDiscontiguous,"AttributedString.Runs.Index's Strideable conformance may not be used with discontiguous sliced runs")
228
227
returnSelf(_runOffset:self._runOffset + n, withinDiscontiguous:false)
0 commit comments