MCPcopy Create free account
hub / github.com/apache/nutch / reverseAppendSplits

Method reverseAppendSplits

src/java/org/apache/nutch/util/TableUtil.java:122–133  ·  view source on GitHub ↗
(String string, StringBuilder buf)

Source from the content-addressed store, hash-verified

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();

Callers 3

reverseUrlMethod · 0.95
unreverseUrlMethod · 0.95
reverseHostMethod · 0.95

Calls 2

splitMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected