A collection of helpful Swift extensions and utilities
- Add to following to your project's Swift Package Manager dependencies:
https://github.com/ahcode0919/Fast.git
[Double]
.random(range:_size:_)
create a array of random values within a specified range
[Float]
.random(range:_size:_)
create a array of random values within a specified range
[Int]
.random(range:_size:_)
create a array of random values within a specified range
[UInt]
.random(range:_size:_)
create a array of random values within a specified range
CountedSet
OrderedSet
byteFormattedString(units:_, countStyle:_)
ConvertInt64
to byte measurement string Ex:100_000
=100 KB
String.random(length:_)
- Create a string of alphanumeric characters of the specified lengthchomp()
- Removes white space from the start and end of a Stringcontains(_ type: NSTextCheckingResult.CheckingType)
- Checks for matching string format. Date, link, phonenumber, etcextractDoubles() -> [Doubles]
- Extract Doubles from stringextractInts() -> [Int]
- Extract integers from stringwithQuotes()
- Encapsulates a String in quotations