MCPcopy Create free account
hub / github.com/boxbeam/RedLib / escapeSequence

Method escapeSequence

src/redempt/redlib/json/JSONParser.java:101–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 }
100
101 private char escapeSequence() {
102 switch (advance()) {
103 case 'n':
104 return '\n';
105 case 't':
106 return '\t';
107 case 'r':
108 return '\r';
109 case 'u':
110 return (char) Integer.parseInt(str.substring(pos, pos + 4), 16);
111 case '"':
112 return '"';
113 case '\\':
114 return '\\';
115 default:
116 throw new IllegalArgumentException("Invalid escape sequence at position " + pos);
117 }
118 }
119
120 private String string() {
121 assertChar('"');

Callers 1

stringMethod · 0.95

Calls 1

advanceMethod · 0.95

Tested by

no test coverage detected