Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSabintsev authored Mar 9, 2017
1 parent 2730911 commit 384123d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ let string = "Hello World"
string.truncated(length: 7) // "Hell..." (Appends an ellipsis, ..., to the end of the string.)
```

### Regex Operations
`GuitarRegex` is a syntactic-sugar struct built on top of NSRegularExpression. It also introduces the `GuitarPattern` struct which represents common Regex patterns.

Example usage:
```swift
GuitarRegex(pattern: GuitarPattern.email).evaluate(string: "This string contains an email address, [email protected]")
// Returns an [Range<String.Index>] which is easily used to make substitutions/replacements in the String API found within Foundation.
```

## Inspiration
This project was inspired by [Voca](https://vocajs.com/).

Expand Down

0 comments on commit 384123d

Please sign in to comment.