Description
It would be nice to have a method that compares a string to multiple strings as follows:
StringUtils.equalsAny("baz", "for", "bar", "baz"); // true StringUtils.equalsAny("xyz", "for", "bar", "baz"); // false
I created a PR if there is an interest in adding this to the library:
Attachments
Issue Links
- duplicates
-
LANG-704 New methods for StringUtils class: equalsAny and equalsAnyIgnoreCase
- Closed