Class CharSequenceUtil

java.lang.Object
jodd.util.CharSequenceUtil

public class CharSequenceUtil extends Object
  • Constructor Details

    • CharSequenceUtil

      public CharSequenceUtil()
  • Method Details

    • equals

      public static boolean equals(CharSequence charSequence1, CharSequence charSequence2)
    • equalsToLowercase

      public static boolean equalsToLowercase(CharSequence charSequence, CharSequence name)
    • startsWithLowercase

      public static boolean startsWithLowercase(CharSequence charSequence, CharSequence chars)
    • compare

      private static boolean compare(CharSequence charSequence, CharSequence chars, int length)
    • equalsIgnoreCase

      public static boolean equalsIgnoreCase(CharSequence charSequence1, CharSequence charSequence2)
    • equalsOne

      public static boolean equalsOne(char c, CharSequence match)
      Match if one character equals to any of the given character.
      Returns:
      true if characters match any character from given array, otherwise false
    • findFirstEqual

      public static int findFirstEqual(CharSequence source, int index, CharSequence match)
      Finds index of the first character in given charsequence the matches any from the given set of characters.
      Returns:
      index of matched character or -1
    • findFirstEqual

      public static int findFirstEqual(char[] source, int index, char match)
      Finds index of the first character in given array the matches any from the given set of characters.
      Returns:
      index of matched character or -1
    • findFirstDiff

      public static int findFirstDiff(CharSequence source, int index, CharSequence match)
      Finds index of the first character in given charsequence the differs from the given set of characters.
      Returns:
      index of matched character or -1
    • findFirstDiff

      public static int findFirstDiff(char[] source, int index, char match)
      Finds index of the first character in given array the differs from the given set of characters.
      Returns:
      index of matched character or -1