MCPcopy Create free account
hub / github.com/FongMi/TV / convert

Method convert

catvod/src/main/java/com/github/catvod/utils/Trans.java:49–57  ·  view source on GitHub ↗
(String text, Map<Character, Character> map)

Source from the content-addressed store, hash-verified

47 }
48
49 private static String convert(String text, Map<Character, Character> map) {
50 int length = text.length();
51 StringBuilder sb = new StringBuilder(length);
52 for (int i = 0; i < length; i++) {
53 char c = text.charAt(i);
54 sb.append(map.getOrDefault(c, c));
55 }
56 return sb.toString();
57 }
58}

Callers 2

s2tMethod · 0.95
t2sMethod · 0.95

Calls 2

appendMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected