(String string, StringBuilder buf)
| 120 | } |
| 121 | |
| 122 | private static void reverseAppendSplits(String string, StringBuilder buf) { |
| 123 | String[] splits = StringUtils.split(string, '.'); |
| 124 | if (splits.length > 0) { |
| 125 | for (int i = splits.length - 1; i > 0; i--) { |
| 126 | buf.append(splits[i]); |
| 127 | buf.append('.'); |
| 128 | } |
| 129 | buf.append(splits[0]); |
| 130 | } else { |
| 131 | buf.append(string); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | public static String reverseHost(String hostName) { |
| 136 | StringBuilder buf = new StringBuilder(); |
no test coverage detected