Guitar

A Cross-Platform String and Regular Expression Library Written in Swift.

BuddyBuild Documentation Platform

CocoaPods Carthage Compatible SwiftPM Compatible CocoaPods CocoaPods

About

This library seeks to add common string manipulation functions, including common regular expression capabilities, that are needed in both mobile and server-side development, but are missing in Swift’s Foundation library.

The full documentation can be found at http://www.sabintsev.com/Guitar/.

Status

  • Release Stage: Alpha
  • API Stability: Unstable

Features

  • [x] Boolean Functions (isAlpha, isNumeric, isUppercase, etc.)
  • [x] Case Functions (camelCased, pascalCased, kebabCased, etc.)
  • [x] Character Functions (first, length, reversed, etc.)
  • [ ] Latinization Functions
  • [ ] HTML Manipulation Functions
  • [x] Padding Functions (padLeft, padRight, pad)
  • [ ] Performance Enhancements
  • [x] Regular Expressions (with Common Patterns Built-in)
  • [x] Trimming Functions (trimLeft, trimRight, truncated, etc.)

There’s a lot more work in the pipeline, but community contributions are highly encouraged.

Installation Instructions

CocoaPods

pod 'Guitar'

Carthage

github "ArtSabintsev/Guitar"

Swift Package Manager

.Package(url: "https://github.com/ArtSabintsev/Guitar.git", majorVersion: 0)

Example

Guitar is currently in Alpha (until v0.1.0). During this stage, the API is unstable. Therefore, it does not make sense to retain examples in the README until the API has stabilized.

For the time being, check out the tests to see the various functions in the library in action.

Inspiration

Created and maintained by

Arthur Ariel Sabintsev