Class StringUtils

java.lang.Object
io.cucumber.gherkin.StringUtils

final class StringUtils extends Object
  • Field Details

  • Constructor Details

    • StringUtils

      private StringUtils()
  • Method Details

    • isWhitespaceExcludingNewLine

      static boolean isWhitespaceExcludingNewLine(char c)
      An extended definition of Whitespace minus new lines.
      Parameters:
      c - character to test
      Returns:
      true iff the c is whitespace and not new line.
      See Also:
    • isWhitespace

      static boolean isWhitespace(char c)
      An extended definition of Whitespace.

      Characters in Unicode general category Zs and directionality categories WS, B, and S are considered whitespace for this definition.

      Parameters:
      c - character to test
      Returns:
      true iff the c is whitespace.
    • isWhiteSpaceSlow

      static boolean isWhiteSpaceSlow(char c)
    • isCharacterTypeSpace

      private static boolean isCharacterTypeSpace(char c)
    • isDirectionalitySpace

      private static boolean isDirectionalitySpace(char c)
    • trimAndIndentKeepNewLines

      static StringUtils.IndentedText trimAndIndentKeepNewLines(StringBuilder input)
    • trimAndIndent

      static StringUtils.IndentedText trimAndIndent(String input)
    • containsWhitespace

      static boolean containsWhitespace(String input, int fromIndex, int toIndex)
    • substringAndLeftTrim

      static String substringAndLeftTrim(String input, int beginIndex, int endIndex)