Class StringUtils

java.lang.Object
org.htmlunit.cyberneko.util.StringUtils

public final class StringUtils extends Object
String utilities class for utility functions not covered by third party libraries.
Author:
Ronald Brill
  • Method Details

    • isEmptyString

      public static boolean isEmptyString(CharSequence s)
      Returns true if the param is not null and empty. This is different from org.apache.commons.lang3.StringUtils#isEmpty(CharSequence) because this returns false if the provided string is null.
      Parameters:
      s - the string to check
      Returns:
      true if the param is not null and empty
    • equalsChar

      public static boolean equalsChar(char expected, CharSequence s)
      Parameters:
      expected - the char that we expect
      s - the string to check
      Returns:
      true if the provided string has only one char and this matches the expectation