-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from rkukuh/dev
Update README.md
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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 | ||
``` |