SwifterSwift v4.3.0 Release Notes

Release Date: 2018-04-10 // almost 6 years ago
  • ➕ Added

    • Swift 4.1 / Xcode 9.3
      • Added Swift 4.1 support.
    • 🐧 Linux Support:
      • Updated all swift files to use Swift's 4.1 # if canImport(module) statement, which brings the project one step closer to first-class Linux support.
    • Sequence
      • all() method moved from ArrayExtensions to SequenceExtensions. #424 by n0an.
      • none() method moved from ArrayExtensions to SequenceExtensions. #424 by n0an.
      • Added any() method to return if any element of sequence elements conforms to given condition. #424 by n0an.
    • SignedInteger
      • added ordinalString(locale:) method to return string ordinal representation of number in specified locale language. #434 by n0an.
    • SignedNumeric
      • added spelledOutString(locale:) method to return string representation of number spelled in specified locale language. #434 by n0an.
    • String
      • added computed property isSpelledCorrectly to check if the given string has typos or not. #430 by n0an.
      • added removingPrefix(_ prefix:) method to remove given prefix from the string. #430 by n0an.
      • added removingSuffix(_ suffix:) method to remove given suffix from the string. #430 by n0an.
    • 👕 SwiftLint:
      • reduced the number of disabled rules in .swiftlint.yml, please add disable and enable statements from now on when needed in code.
      • added SwiftLint to test targets to insure code style consistency across the project.

    🔄 Changed

    • SignedNumeric:
      • asLocaleCurrency now returns an optional string.
    • Array:
      • rotate method now returns a discardableResult.
      • shuffle method now returns a discardableResult.
      • sort<T: Comparable>(by:, ascending:) method now returns a discardableResult.
      • keep method now returns a discardableResult.

    🗄 Deprecated

    • UIStoryboard:
      • mainStoryboard property has been renamed to main.
    • Array:
      • deprecated pop method in favor of Swift’s popLast.
      • deprecated push method in favor of Swift’s append.
      • deprecated swap method in favor of Swift’s swapAt.
      • deprecated item(at index: Int) method in favor of subscript(safe:).
      • duplicatesRemoved method has been renamed to withoutDuplicates.
    • Bool:
      • deprecated toggled property, use !self instead.
      • deprecated toggle method, use self = !self instead.

    🛠 Fixed

    • String
      • Fixed UIView extension addShadow was not showing the shadow on view bug. #420 by LucianoPAlmeida.