Creates a function that can perform a wildcard match to compare against a function;
the function returns `null` if no match, `"exact"` for an exact match, or a number
to indicating the number of segments in the package (eg `qx.util.*` will match
`qx.util.format.DateFormat` will return 2 because there is `qx` and `util`)

@param include {String[]} the wildcard specs to include
@param exclude {String[]} the wildcard specs to exclude
@return {Function}
function(include, exclude) {
      var code = [];
      if (exclude) {
        exclude.forEach(spec => {
          var pos;
          if ((pos = spec.indexOf("*")) > -1) {
            code.push("  if (value.startsWith(\"" + spec.substring(0, pos) + "\"))\n    return null; // " + spec);
          } else {
            code.push("  if (value === \"" + spec + "\")\n  return null;");
          }
        });
      }
      if (include) {
        include.forEach(spec => {
          var pos;
          pos = -1;
          var nsDepth = 0;
          while ((pos = spec.indexOf(".", pos + 1)) > -1) {
            nsDepth++;
          }
          if ((pos = spec.indexOf("*")) > -1) {
            code.push("  if (value.startsWith(\"" + spec.substring(0, pos) + "\"))\n    return " + nsDepth + "; // " + spec);
          } else {
            code.push("  if (value === \"" + spec + "\")\n  return \"exact\";");
          }
        });
      }
      code.push("  return null;");
      return new Function("value", code.join("\n"));      
    }