MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / findBlock

Method findBlock

src/main/java/IE/Accounts.java:167–177  ·  view source on GitHub ↗
(String source, String needle)

Source from the content-addressed store, hash-verified

165 }
166
167 private String findBlock(String source, String needle) {
168 String startItem = "<" + needle + ">";
169 int start = source.indexOf(startItem);
170 int end = source.indexOf("</" + needle + ">");
171
172 if (start > -1 && end > -1 && start != end) {
173 return source.substring(start + startItem.length(), end);
174 }
175
176 return "";
177 }
178
179 private String createBlock(String needle, String value) {
180 StringBuffer block = new StringBuffer("<").append(needle).append('>');

Callers 1

importDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected