Class StringUtilities

java.lang.Object
org.apache.jorphan.util.StringUtilities

@API(status=EXPERIMENTAL, since="5.6") public class StringUtilities extends Object
Functions that are missing in other libraries.
Since:
5.6
  • Method Details

    • count

      public 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