Added containsNone methods.
This commit is contained in:
parent
b2adaba8ba
commit
0445919fc2
1 changed files with 38 additions and 0 deletions
|
@ -328,6 +328,44 @@ public class StringsUtils
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains none.
|
||||
*
|
||||
* @param token
|
||||
* the token
|
||||
* @param strings
|
||||
* the strings
|
||||
* @return true, if successful
|
||||
*/
|
||||
public static boolean containsNone(final String token, final String... strings)
|
||||
{
|
||||
boolean result;
|
||||
|
||||
result = !containsAny(token, strings);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains none ignore case.
|
||||
*
|
||||
* @param token
|
||||
* the token
|
||||
* @param strings
|
||||
* the strings
|
||||
* @return true, if successful
|
||||
*/
|
||||
public static boolean containsNoneIgnoreCase(final String token, final String... strings)
|
||||
{
|
||||
boolean result;
|
||||
|
||||
result = !containsAnyIgnoreCase(token, strings);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains null.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue