MCPcopy Index your code
hub / github.com/java-native-access/jna / getLibraryName

Method getLibraryName

src/com/sun/jna/NativeLibrary.java:394–408  ·  view source on GitHub ↗
(String libraryName)

Source from the content-addressed store, hash-verified

392 }
393
394 private String getLibraryName(String libraryName) {
395 String simplified = libraryName;
396 final String BASE = "---";
397 String template = mapSharedLibraryName(BASE);
398 int prefixEnd = template.indexOf(BASE);
399 if (prefixEnd > 0 && simplified.startsWith(template.substring(0, prefixEnd))) {
400 simplified = simplified.substring(prefixEnd);
401 }
402 String suffix = template.substring(prefixEnd + BASE.length());
403 int suffixStart = simplified.indexOf(suffix);
404 if (suffixStart != -1) {
405 simplified = simplified.substring(0, suffixStart);
406 }
407 return simplified;
408 }
409
410 /**
411 * Returns an instance of NativeLibrary for the specified name.

Callers 1

NativeLibraryMethod · 0.95

Calls 3

mapSharedLibraryNameMethod · 0.95
indexOfMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected