Skip to content

Commit

Permalink
Merge pull request #8 from rkukuh/dev
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
rkukuh authored Mar 26, 2023
2 parents 1bc627b + 6b28955 commit 44ffa92
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import SwiftStringHelper
These following methods are available for working with and manipulating `String` native library. See [Usage](https://github.com/rkukuh/Swift-StringHelper#usage) section below for detail.

- [`after`](https://github.com/rkukuh/Swift-StringHelper#after)
- [`before`](https://github.com/rkukuh/Swift-StringHelper#before)

## Usage

Expand All @@ -39,3 +40,14 @@ let result = originalString.after("@")

print(result) // apple.com
```

### `before`

The `before` helper returns the portion of a string before the first occurrence of a given value.

```swift
let originalString = "[email protected]"
let result = originalString.before("@")

print(result) // john
```

0 comments on commit 44ffa92

Please sign in to comment.