MCPcopy Create free account
hub / github.com/ZsBT/mrz-java / getCharacterValue

Method getCharacterValue

src/main/java/com/innovatrics/mrz/MrzParser.java:223–234  ·  view source on GitHub ↗
(char c)

Source from the content-addressed store, hash-verified

221 }
222
223 private static int getCharacterValue(char c) {
224 if (c == FILLER) {
225 return 0;
226 }
227 if (c >= '0' && c <= '9') {
228 return c - '0';
229 }
230 if (c >= 'A' && c <= 'Z') {
231 return c - 'A' + 10;
232 }
233 throw new RuntimeException("Invalid character in MRZ record: " + c);
234 }
235
236 /**
237 * Computes MRZ check digit for given string of characters.

Callers 1

computeCheckDigitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected