Bump addressable from 2.7.0 to 2.8.0 (#29)
Bumps addressable from 2.7.0 to 2.8.0.
updated-dependencies:
- dependency-name: addressable dependency-type: indirect …
Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Guitar 🎸
A Cross-Platform String and Regular Expression Library written in Swift.
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 Standard Library.
The full documentation can be found at http://www.sabintsev.com/Guitar/.
Guitar is also part of Swift’s Source Compatibility Suite.
Features
isAlpha,isNumeric,isUppercase, etc.)camelCased,pascalCased,kebabCased, etc.).latinized(),.withoutAccents())padLeft,padRight,pad)Sherlocked
A small set of functions offered by Guitar were removed in v0.3.0 of the library as Apple added many of these features to the Swift 4 language (aka, Sherlocking). The functions that were removed were:
first, last, length, prefixed, suffixed, trimLeft, trimRight, truncated. Thereversedfunction was renamed toreversedStringas it acts slightly differently than Swift’s built-inreversedfunction.Installation Instructions
CocoaPods
Swift Package Manager
Usage Examples
Regular Expression
Guitarmakes it easier to use Regular Expressions to test and evaluateStringobjects.Guitar.Chordenumerates common regular expressions and they are located in GuitarChord.swift.Initialization
Methods
evaluateForRanges(::)returns an array of ranges,[Range<String.Index>], that match a specific regular expression.evaluateForStrings(::)returns an array of strings,[String], that match a specific regular expression.test(::)evaluates a string with a specific regular expression.trueis returned if matches are found in the string. Otherwise,falseis returned.String Extension
This library also adds dozens of methods via
Stringextensions that are missing in the Swift Standard Library or not easily accessible on theStringclass. CheckGuitarBoolean.swiftandGuitarPadding.swiftto see these examples.More specific examples can be found in the tests folder.
Inspiration
Created and maintained by
Arthur Ariel Sabintsev