MCPcopy
hub / github.com/google/guava / convert

Method convert

guava/src/com/google/common/base/CaseFormat.java:45–54  ·  view source on GitHub ↗
(CaseFormat format, String s)

Source from the content-addressed store, hash-verified

43 }
44
45 @Override
46 String convert(CaseFormat format, String s) {
47 if (format == LOWER_UNDERSCORE) {
48 return s.replace('-', '_');
49 }
50 if (format == UPPER_UNDERSCORE) {
51 return Ascii.toUpperCase(s.replace('-', '_'));
52 }
53 return super.convert(format, s);
54 }
55 },
56
57 /** C++ variable naming convention, e.g., "lower_underscore". */

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