mirror of
https://github.com/shekhargulati/strman-java.git
synced 2026-10-28 20:03:43 +00:00
Added support for containsAll function
This commit is contained in:
@@ -84,13 +84,27 @@ final String result = collapseWhitespace(title);
|
||||
Verifies that the needle is contained in value.
|
||||
|
||||
```java
|
||||
boolean result = contains("foo bar", "bazz", false);
|
||||
boolean result = contains("foo bar", "BAR", true);
|
||||
// result = false
|
||||
|
||||
boolean result = contains("foo bar", "FOO");
|
||||
// result = true
|
||||
```
|
||||
|
||||
## containsAll(value, needles, caseSensitive)
|
||||
|
||||
Verifies that all needles are contained in value.
|
||||
|
||||
```java
|
||||
boolean result = containsAll("foo bar", new String[]{"FOO", "bar"});
|
||||
// result = true
|
||||
|
||||
boolean result = containsAll("foo bar", new String[]{"FOO", "bar"}, true);
|
||||
// result = false
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Other functions that can be added
|
||||
|
||||
|
||||
Reference in New Issue
Block a user