MCPcopy Create free account
hub / github.com/antlr/codebuff / convert

Method convert

corpus/java/training/guava/base/CaseFormat.java:44–53  ·  view source on GitHub ↗
(CaseFormat format, String s)

Source from the content-addressed store, hash-verified

42 }
43
44 @Override
45 String convert(CaseFormat format, String s) {
46 if (format == LOWER_UNDERSCORE) {
47 return s.replace('-', '_');
48 }
49 if (format == UPPER_UNDERSCORE) {
50 return Ascii.toUpperCase(s.replace('-', '_'));
51 }
52 return super.convert(format, s);
53 }
54 },
55
56 /**

Callers 1

toMethod · 0.95

Calls 9

toUpperCaseMethod · 0.95
toLowerCaseMethod · 0.95
toStringMethod · 0.65
replaceMethod · 0.45
indexInMethod · 0.45
lengthMethod · 0.45
appendMethod · 0.45
normalizeFirstWordMethod · 0.45
normalizeWordMethod · 0.45

Tested by

no test coverage detected