MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / fromNativeString

Method fromNativeString

src/main/java/wycc/util/Trie.java:278–285  ·  view source on GitHub ↗

Construct a Trie from a native string, where the separator is determined by the native filesystem separator char. s @param str @return

(String str)

Source from the content-addressed store, hash-verified

276 * @return
277 */
278 public static Trie fromNativeString(String str) {
279 String[] components = str.split(Pattern.quote(File.separator));
280 Trie r = ROOT;
281 for(int i=0;i!=components.length;++i) {
282 r = r.append(components[i]);
283 }
284 return r;
285 }
286
287 // =========================================================
288 // Private Methods

Callers 1

mainMethod · 0.95

Calls 1

appendMethod · 0.95

Tested by

no test coverage detected