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

Method to

guava/src/com/google/common/base/CaseFormat.java:129–133  ·  view source on GitHub ↗

Converts the specified {@code String str} from this format to the specified {@code format}. A "best effort" approach is taken; if {@code str} does not conform to the assumed format, then the behavior of this method is undefined but we make a reasonable effort at converting anyway.

(CaseFormat format, String str)

Source from the content-addressed store, hash-verified

127 * the behavior of this method is undefined but we make a reasonable effort at converting anyway.
128 */
129 public final String to(CaseFormat format, String str) {
130 checkNotNull(format);
131 checkNotNull(str);
132 return (format == this) ? str : convert(format, str);
133 }
134
135 /** Enum values can override for performance reasons. */
136 String convert(CaseFormat format, String s) {

Calls 2

convertMethod · 0.95
checkNotNullMethod · 0.45