Skip to content

Commit

Permalink
Add containsAll usage documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rkukuh committed Apr 1, 2023
1 parent f7cc1dd commit a0b325a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ These following methods are available for working with and manipulating `String`
- [`before`](https://github.com/rkukuh/Swift-StringHelper#before)
- [`between`](https://github.com/rkukuh/Swift-StringHelper#between)
- [`camelCase`](https://github.com/rkukuh/Swift-StringHelper#camelcased)
- [`containsAll`](https://github.com/rkukuh/Swift-StringHelper#containsall)

## Usage

Expand Down Expand Up @@ -79,3 +80,21 @@ var result = originalString.camelCased()

print(result) // everyoneCanCode
```

### `containsAll`

The `containsAll()` helper determines if the given string contains all of the values in a given array.

```swift
let originalString = "[email protected]"
let result = originalString.containsAll(["hello", "@", ".com"])

print(result) // true
```

```swift
let originalString = "[email protected]"
let result = originalString.containsAll(["hello", "@", ".org"])

print(result) // false
```

0 comments on commit a0b325a

Please sign in to comment.