Class UnicodeUtilities

java.lang.Object
com.yahoo.javacc.UnicodeUtilities

public class UnicodeUtilities extends Object
Author:
Simon Thoresen Hult
  • Constructor Details

    • UnicodeUtilities

      public UnicodeUtilities()
  • Method Details

    • quote

      public static String quote(String str, char quote)
      Adds a leading and trailing double quotation mark to the given string. This will escape whatever content is within the string literal.
      Parameters:
      str - The string to quote.
      quote - The quote character.
      Returns:
      The quoted string.
    • unquote

      public static String unquote(String str)
      Removes leading and trailing quotation mark from the given string. This method will properly unescape whatever content is withing the string literal as well.
      Parameters:
      str - The string to unquote.
      Returns:
      The unquoted string.
    • generateToken

      public static String generateToken(UnicodeUtilities.Predicate predicate)