Package com.yahoo.javacc
Class UnicodeUtilities
java.lang.Object
com.yahoo.javacc.UnicodeUtilities
- Author:
- Simon Thoresen Hult
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
generateToken
(UnicodeUtilities.Predicate predicate) static String
Adds a leading and trailing double quotation mark to the given string.static String
Removes leading and trailing quotation mark from the given string.
-
Constructor Details
-
UnicodeUtilities
public UnicodeUtilities()
-
-
Method Details
-
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
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
-