Class StringSearchUtils

java.lang.Object
uk.ac.ebi.utils.string.StringSearchUtils

public class StringSearchUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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 of StringUtils.indexOfAny(CharSequence, char...) that allows to specify the start position.
    static int
    indexOfAny(String s, int startPos, CharSequence... chars)
    An extension of StringUtils.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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • containsOneOf

      public static boolean containsOneOf(String target, String... matches)
      Tells if the string contains one of the matches.
    • containsOneOfIgnoreCase

      public static boolean containsOneOfIgnoreCase(String target, String... matches)
      Tells if the string contains one of the matches.
    • indexOfAny

      public static int indexOfAny(String s, int startPos, char... chars)
      An extension of StringUtils.indexOfAny(CharSequence, char...) that allows to specify the start position.
    • indexOfAny

      public static int indexOfAny(String s, int startPos, CharSequence... chars)
      An extension of StringUtils.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.