Class StringUtilities

  • All Implemented Interfaces:

    @API(status = API.Status.EXPERIMENTAL, since = "5.6") 
    public class StringUtilities
    
                        

    Functions that are missing in other libraries.

    Since:

    5.6

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static int count(String input, char ch) Counts the number of times a given char is present in the string.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • count

         static int count(String input, char ch)

        Counts the number of times a given char is present in the string.

        Parameters:
        input - input string
        ch - char to search
        Returns:

        number of times the character is present in the string, or 0 if no char found