Package 

Class Strings


  • 
    public final class Strings
    
                        

    String helper

    • Method Summary

      Modifier and Type Method Description
      static boolean equalsAny(CharSequence cs, Array<CharSequence> strs) Checks if the CharSequence equals any character in the given set of characters.
      static boolean containsAny(CharSequence cs, CharSequence searchChars) Checks if the CharSequence contains any character in the given set of characters.
      static boolean containsAny(CharSequence cs, Array<char> searchChars) Checks if the CharSequence contains any character in the given set of characters.
      static boolean isEmpty(CharSequence cs) Checks if a CharSequence is empty ("") or null.
      static int countMatches(CharSequence str, CharSequence sub) Counts how many times the substring appears in the larger string.
      • Methods inherited from class java.lang.Object

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

      • equalsAny

         static boolean equalsAny(CharSequence cs, Array<CharSequence> strs)

        Checks if the CharSequence equals any character in the given set of characters.

        Parameters:
        cs - the CharSequence to check
      • containsAny

         static boolean containsAny(CharSequence cs, CharSequence searchChars)

        Checks if the CharSequence contains any character in the given set of characters.

        Parameters:
        cs - the CharSequence to check, may be null
        searchChars - the chars to search for, may be null
      • containsAny

         static boolean containsAny(CharSequence cs, Array<char> searchChars)

        Checks if the CharSequence contains any character in the given set of characters.

        Parameters:
        cs - the CharSequence to check, may be null
        searchChars - the chars to search for, may be null
      • isEmpty

         static boolean isEmpty(CharSequence cs)

        Checks if a CharSequence is empty ("") or null.

        Parameters:
        cs - the CharSequence to check, may be null
      • countMatches

         static int countMatches(CharSequence str, CharSequence sub)

        Counts how many times the substring appears in the larger string.

        Parameters:
        str - the CharSequence to check, may be null
        sub - the substring to count, may be null