MCPcopy Create free account
hub / github.com/Qihoo360/poseidon / Split

Method Split

builder/index/src/main/java/InvertedIndex/plugin/Util.java:143–165  ·  view source on GitHub ↗
(String line, String sptr)

Source from the content-addressed store, hash-verified

141 List<String> cols = Util.Split(line, "\t");
142 * */
143 public static List<String> Split(String line, String sptr) {
144
145 List<String> strs = null;
146 if (line == null || sptr == null || line.isEmpty())
147 return strs;
148
149 strs = new ArrayList<String>();
150 int pos = line.indexOf(sptr);
151 if (sptr.isEmpty() || pos == -1) {
152 strs.add(line);
153 return strs;
154 }
155
156 int begin = 0;
157 while (pos != -1) {
158 strs.add(line.substring(begin, pos));
159 begin = pos + sptr.length();
160 pos = line.indexOf(sptr, begin);
161 }
162 strs.add(line.substring(begin));
163
164 return strs;
165 }
166
167 public static Vector<String> ParseIp(String val) {
168 Vector<String> res = new Vector();

Callers 15

GetMethod · 0.80
parseRequestFunction · 0.80
initBackendStoreMethod · 0.80
SetRequestFunction · 0.80
GetRequestFunction · 0.80
FetchIndexMethod · 0.80
SymcGetFunction · 0.80
FilterColumnsMethod · 0.80
ParseDocRowFunction · 0.80
ParseMethod · 0.80
CommandLineParametersMethod · 0.80
generateHeaderMethod · 0.80

Calls

no outgoing calls

Tested by 1

handleMethod · 0.64