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)
| 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) { |