Package uk.ac.ebi.utils.string
Class StringSearchUtils
java.lang.Object
uk.ac.ebi.utils.string.StringSearchUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsOneOf
(String target, String... matches) Tells if the string contains one of the matches.static boolean
containsOneOfIgnoreCase
(String target, String... matches) Tells if the string contains one of the matches.static int
indexOfAny
(String s, int startPos, char... chars) An extension ofStringUtils.indexOfAny(CharSequence, char...)
that allows to specify the start position.static int
indexOfAny
(String s, int startPos, CharSequence... chars) An extension ofStringUtils.indexOfAny(CharSequence, CharSequence...)
that allows to specify the start position.protected static <KA> int
indexOfAny
(String s, int startPos, BiFunction<String, KA, Integer> searcher, KA keys) All the above methods are based on this template: the search function searches for keys in some input (internal to the function, defined by the invoker of this method), returns -1 or the string index where one of the keys was found.
-
Method Details
-
containsOneOf
Tells if the string contains one of the matches. -
containsOneOfIgnoreCase
Tells if the string contains one of the matches. -
indexOfAny
An extension ofStringUtils.indexOfAny(CharSequence, char...)
that allows to specify the start position. -
indexOfAny
An extension ofStringUtils.indexOfAny(CharSequence, CharSequence...)
that allows to specify the start position. -
indexOfAny
protected static <KA> int indexOfAny(String s, int startPos, BiFunction<String, KA, Integer> searcher, KA keys) All the above methods are based on this template: the search function searches for keys in some input (internal to the function, defined by the invoker of this method), returns -1 or the string index where one of the keys was found.
-