MCPcopy Create free account
hub / github.com/google/re2j / unicodeTable

Method unicodeTable

java/com/google/re2j/Parser.java:1524–1538  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

1522 // and the table of additional fold-equivalent code points.
1523 // Returns null if |name| does not identify a Unicode character range.
1524 private static Pair<int[][], int[][]> unicodeTable(String name) {
1525 // Special case: "Any" means any.
1526 if (name.equals("Any")) {
1527 return Pair.of(ANY_TABLE, ANY_TABLE);
1528 }
1529 int[][] table = UnicodeTables.CATEGORIES.get(name);
1530 if (table != null) {
1531 return Pair.of(table, UnicodeTables.FOLD_CATEGORIES.get(name));
1532 }
1533 table = UnicodeTables.SCRIPTS.get(name);
1534 if (table != null) {
1535 return Pair.of(table, UnicodeTables.FOLD_SCRIPT.get(name));
1536 }
1537 return null;
1538 }
1539
1540 // parseUnicodeClass() parses a leading Unicode character class like \p{Han}
1541 // from the beginning of t. If one is present, it appends the characters to

Callers 1

parseUnicodeClassMethod · 0.95

Calls 3

ofMethod · 0.95
getMethod · 0.80
equalsMethod · 0.45

Tested by

no test coverage detected