code: private Optional<String> process(final String path, Function<String, String> func) {
  		String workPath = path;
  		if (workPath == null) {
  			throw new IllegalArgumentException("Given String must not be null!");
  		}
  		if (workPath.charAt(0) != PATH_SEPARATOR) {
  			workPath = PATH_SEPARATOR + workPath;
  		}
  		workPath = func.apply(workPath);
  		if (workPath != null && workPath.trim().length() > 0) {
  			return Optional.of(workPath);
  		} else {
  			return Optional.empty();
  		}
  	}
docs: <p>Reduces duplication for the actual parsing-functions, by checking for null and wrapping the result
  in an Optional.</p>
  <p>Used by the actual matching:
  <ul>
  <li>{@link #matchLocalePrefix(String, MatchingResult)}</li>
  <li>{@link #matchLibraryName(String, MatchingResult)}</li>
  <li>{@link #matchLibraryVersion(String, MatchingResult)}</li>
  <li>{@link #matchResourceName(String, MatchingResult)}</li>
  <li>{@link #matchResourceVersion(String, MatchingResult)}</li>
  <p>
  </ul>
  </p>
  
  @param path the path (may be partially stripped) which will be checked and passed to the function
  @param func actual matching logic provided as function
  @return the result from the given function wrapped in an Optional