Skip to content

A lightweight Swift framework providing commonly used extensions for Foundation types, simplifying everyday iOS development tasks.

License

Notifications You must be signed in to change notification settings

arcos33/CoreExtensions

Repository files navigation

CoreExtensions

A lightweight Swift framework providing commonly used extensions for Foundation types, simplifying everyday iOS development tasks.

Features

  • String Extensions
  • Email validation
  • String formatting
  • URL encoding
  • Case modifications
  • Whitespace handling
// Email validation
let email = "[email protected]"
email.isValidEmail // true

// String formatting
let text = "  Hello World  "
text.trimmed // "Hello World"

Requirements

  • iOS 13.0+
  • Swift 5.0+
  • Xcode 14.0+

Installation

Swift Package Manager

  1. In Xcode, select FileAdd Packages...
  2. Enter package URL:
https://github.com/arcos33/CoreExtensions.git
  1. Select your desired version rules
  2. Click Add Package

Usage

First, import the framework:

import CoreExtensions

String Extensions

// Email validation
let email = "[email protected]"
if email.isValidEmail {
    print("Valid email")
}

// String formatting
let text = "  Hello World  "
let trimmed = text.trimmed
print(trimmed) // "Hello World"

// URL encoding
let urlString = "Hello World!"
let encoded = urlString.urlEncoded // "Hello%20World!"

// First letter capitalization
let name = "john"
let capitalized = name.capitalizedFirst // "John"

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

CoreExtensions is available under the MIT license. See the LICENSE file for more info.

About

A lightweight Swift framework providing commonly used extensions for Foundation types, simplifying everyday iOS development tasks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published