Bot releases are hidden (Show)
tokenized(locale:)
for creating search terms (learn more)matchesTokenizedPrefixes(in:locale:)
for convenient fuzzy search (learn more)advanced/reversed(byMonths:)
and advanced/reversed(byYears:)
for GregorianDay
startOfMonth(timeZone:)
and startOfYear(timeZone:)
functions on GregorianDay
GregorianDay
and GregorianTimeOfDay
are now variable & the types conform to Withable
TimeInterval
into Duration
for fractional secondsdelay(by:)
due to ambiguity caused by an overloadCaseIterable
extension properties allCasesPrefixedByNil
and allCasesSuffixedByNil
Duration
extensions adding minute/hour/days/weeks, conversion to a TimeInterval
and moreFloat
extension analogous to the existing Double
extension for rounded valuesSymmetricKey
extension making conversion to/from base64 encoded String easierAutoConforming
typealias that adds Codable
, Hashable
, and Sendable
conformance in one goDebouncer
type making debouncing for search input in SwiftUI easyGregorianDay
type for storing just the day part of a Date
without timeGreogorianTimeOfDay
type for storing just the time part of a Date
without the dayOperatingSystem
type with a OS
typealias to specify different values based on the current OSHandyRegex
type and all its functions are now marked as deprecated. A removal is not planned anytime soon as long as NSRegularExpression
API is around. But I encourage you to migrate to Swifts new and very own Regex
type.Unowned
and Weak
wrapper types were removed without substitutionThis release is a breaking change.
If you were using Unowned
or Weak
, you can find & copy their implementation to your project from the old release here.
If you were using Regex
, note that you will get errors because it was renamed to HandyRegex
. But fix-its could not be provided because Swift now has its own Regex
type. So you need to rename uses of Regex
to HandyRegex
manually.
Some more APIs were renamed or removed in favor of a new Swift feature that should be preferred. Fix-its are provided for all these cases. Most APIs remain unchanged but have much better documentation now. 🎉
encrypt(key:)
and decrypt(key:)
functions to String
type for platforms supporting CryptoKit
. Uses AES.GCM algorithm for encryption.round(fractionDigits:rule:)
& rounded(fractionDigits:rule:)
methods to Double
type.Withable
doesn't require an empty init()
method anymore. Instead, it can be combined with any initializer. If you used the Foo { $0.bar = 5 }
type of initializer, you will need to add ().with
behind the type like so: Foo().with { $0.bar = 5 }
.removeAll
method, conformance to BidirectionalCollection
, ExpressibleByArrayLiteral
and removal of newElement
label on `insert..times
etc.DivisibleArithmetic
protocol which easily extends average()
to Collections of Double
, Float
and CGFloat
.@inlinable
for increased real-time performance.Int.init?(randomBelow:)
to use an arbitrary RandomNumberGenerator (instead of just the system one).Withable
protocol to init/copy objects and set properties in a convenient way on a single line.ExpressibleByStringLiteral
conformance of Regex
type to only allow initialization via init(_:options:) throws
interface.NSRange(_:in:)
initializer for converting from Range<String.Index>
sum
computed property on Sequence
types like Array
average
computed property on Collection
types with Int
or Double
elements like [Int]
fullRange
and fullNSRange
computed properties on String
sample
in RandomAccessCollection
instead of Array
)Published by Jeehut about 7 years ago
Published by Jeehut over 7 years ago
sort(stable:)
, sorted(stable:)
, sort(by:stable:)
and sorted(by:stable:)
methods for Array
type to support stable sorting in SwiftPublished by Jeehut over 7 years ago
Published by Jeehut over 7 years ago
timeInterval
conversion methodPublished by Jeehut over 7 years ago
SortedArray
can now be initialized with any Sequence
typeinsert(newElement:)
and insert(contentsOf:)
Array
class in the class SortedArray
, namely:
firstMatchingIndex()
was renamed to index(where:)
subArray(toIndex:)
was renamed to prefix(upTo:)
subArray(fromIndex:)
was renamed to suffix(from:)
delay()
method now takes a typealiased DispatchTimeInterval
and QOS class (optional)Int(randomBelow:)
now is an optional initializer instead of returning 0 in error cases.strip
was renamed to .stripped()
, .mergedWith()
to .merged(with:)
etc.UIColor
extensionCGRect
, CGPoint
, CGSize
)delay
method can't take .main
as its dispatch level
.main
thread if no QOS class is specifiedPublished by Jeehut almost 8 years ago
New:
combinations(with:)
method on Arrays for creating cartesian productsPublished by Jeehut about 8 years ago
Updates the entire project to be compatible with Xcode 8 and Swift 3.