From 0445919fc278ad1d435c139b01088d71c36be32b Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Mon, 22 Feb 2021 01:31:45 +0100 Subject: [PATCH] Added containsNone methods. --- src/fr/devinsy/strings/StringsUtils.java | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/fr/devinsy/strings/StringsUtils.java b/src/fr/devinsy/strings/StringsUtils.java index 7b41537..61a8733 100644 --- a/src/fr/devinsy/strings/StringsUtils.java +++ b/src/fr/devinsy/strings/StringsUtils.java @@ -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. *