Skip to content

1.1.0

Choose a tag to compare

@benlmyers benlmyers released this 29 Mar 18:31
· 1 commit to main since this release

Thanks for using Foundation Plus! 🎉🧱

New Features

  • Format an integer withCommas:
let str = 123456789.withCommas // "123,456,789"
  • Easily get a concrete String from an optional String with ifLet:
let str1: String? = "Hello"
let str2: String? = nil
str1.ifLet() // "Hello"
str2.ifLet() // ""
str2.ifLet(or: "empty string") // "empty string"
  • Copy a String to the clipboard:
"Hello world!".copyToClipboard()
  • Get first and last matching elements of an array using .first(matching:) and .last(matching:).