MCPcopy Index your code
hub / github.com/clojure/clojure / readUnicodeChar

Method readUnicodeChar

src/jvm/clojure/lang/EdnReader.java:228–240  ·  view source on GitHub ↗
(String token, int offset, int length, int base)

Source from the content-addressed store, hash-verified

226}
227
228static private int readUnicodeChar(String token, int offset, int length, int base) {
229 if(token.length() != offset + length)
230 throw new IllegalArgumentException("Invalid unicode character: \\" + token);
231 int uc = 0;
232 for(int i = offset; i < offset + length; ++i)
233 {
234 int d = Character.digit(token.charAt(i), base);
235 if(d == -1)
236 throw new IllegalArgumentException("Invalid digit: " + token.charAt(i));
237 uc = uc * base + d;
238 }
239 return (char) uc;
240}
241
242static private int readUnicodeChar(PushbackReader r, int initch, int base, int length, boolean exact) {
243 int uc = Character.digit(initch, base);

Callers 2

invokeMethod · 0.45
invokeMethod · 0.45

Calls 5

read1Method · 0.95
isWhitespaceMethod · 0.95
isMacroMethod · 0.95
unreadMethod · 0.95
lengthMethod · 0.65

Tested by

no test coverage detected