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

Method charCast

src/jvm/clojure/lang/RT.java:1077–1086  ·  view source on GitHub ↗
(Object x)

Source from the content-addressed store, hash-verified

1075}
1076
1077static public char charCast(Object x){
1078 if(x instanceof Character)
1079 return ((Character) x).charValue();
1080
1081 long n = ((Number) x).longValue();
1082 if(n < Character.MIN_VALUE || n > Character.MAX_VALUE)
1083 throw new IllegalArgumentException("Value out of range for char: " + x);
1084
1085 return (char) n;
1086}
1087
1088static public char charCast(byte x){
1089 char i = (char) x;

Callers 1

seqToTypedArrayMethod · 0.95

Calls 1

longValueMethod · 0.45

Tested by

no test coverage detected