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
. Thereversed
function was renamed toreversedString
as it acts slightly differently than Swift’s built-inreversed
function.Installation Instructions
CocoaPods
Swift Package Manager
Usage Examples
Regular Expression
Guitar
makes it easier to use Regular Expressions to test and evaluateString
objects.Guitar.Chord
enumerates 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.true
is returned if matches are found in the string. Otherwise,false
is returned.String Extension
This library also adds dozens of methods via
String
extensions that are missing in the Swift Standard Library or not easily accessible on theString
class. CheckGuitarBoolean.swift
andGuitarPadding.swift
to see these examples.More specific examples can be found in the tests folder.
Inspiration
Created and maintained by
Arthur Ariel Sabintsev