public class CharSupport extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ANTLRLiteralCharValueEscape
Given a char, we need to be able to show as an ANTLR literal.
|
static int[] |
ANTLRLiteralEscapedCharValue
When converting ANTLR char and string literals, here is the value set of escape chars.
|
| Constructor and Description |
|---|
CharSupport()
|
| Modifier and Type | Method and Description |
|---|---|
static String |
capitalize(String
|
static String |
getANTLRCharLiteralForChar(int c)
Return a string representing the escaped char for code c.
|
static int |
getCharValueFromCharInGrammarLiteral(String
Given char x or \t or ሴ return the char value; Unnecessary escapes like '\{' yield -1.
|
static int |
getCharValueFromGrammarCharLiteral(String
Given a literal like (the 3 char sequence with single quotes) 'a', return the int value of 'a'.
|
static String |
getStringFromGrammarStringLiteral(String
|
public static int[] ANTLRLiteralEscapedCharValue
public static String[] ANTLRLiteralCharValueEscape
public static StringgetANTLRCharLiteralForChar(int c)
public static int getCharValueFromGrammarCharLiteral(Stringliteral)
public static int getCharValueFromCharInGrammarLiteral(Stringcstr)
public static StringgetStringFromGrammarStringLiteral(String literal)