diff --git a/ndn-cpp/c/interest.c b/ndn-cpp/c/interest.c
index 361412e..15553b4 100644
--- a/ndn-cpp/c/interest.c
+++ b/ndn-cpp/c/interest.c
@@ -16,3 +16,57 @@
   // The components are equal length.  Just do a byte compare.  
   return ndn_memcmp(component1->value, component2->value, component1->valueLength);
 }
+
+int ndn_Exclude_matches(struct ndn_Exclude *self, struct ndn_NameComponent *component)
+{
+  unsigned int i;
+  for (i = 0; i < self->nEntries; ++i) {
+    if (self->entries[i].type == ndn_Exclude_ANY) {
+      struct ndn_ExcludeEntry *lowerBound = 0;
+      if (i > 0)
+        lowerBound = self->entries + (i - 1);
+      
+      // Find the upper bound, possibly skipping over multiple ANY in a row.
+      unsigned int iUpperBound;
+      struct ndn_ExcludeEntry *upperBound = 0;
+      for (iUpperBound = i + 1; iUpperBound < self->nEntries; ++iUpperBound) {
+        if (self->entries[iUpperBound].type == ndn_Exclude_COMPONENT) {
+          upperBound = self->entries + iUpperBound;
+          break;
+        }
+      }
+      
+      // If lowerBound != 0, we already checked component equals lowerBound on the last pass.
+      // If upperBound != 0, we will check component equals upperBound on the next pass.
+      if (upperBound != 0) {
+        if (lowerBound != 0) {
+          if (ndn_Exclude_compareComponents(component, &lowerBound->component) > 0 &&
+              ndn_Exclude_compareComponents(component, &upperBound->component) < 0)
+            return 1;
+        }
+        else {
+          if (ndn_Exclude_compareComponents(component, &upperBound->component) < 0)
+            return 1;
+        }
+        
+        // Make i equal iUpperBound on the next pass.
+        i = iUpperBound - 1;
+      }
+      else {
+        if (lowerBound != 0) {
+          if (ndn_Exclude_compareComponents(component, &lowerBound->component) > 0)
+            return 1;
+        }
+        else
+          // this.values has only ANY.
+          return 1;
+      }
+    }
+    else {
+      if (ndn_Exclude_compareComponents(component, &self->entries[i].component) == 0)
+        return 1;
+    }
+  }
+  
+  return 0;  
+}
diff --git a/ndn-cpp/c/interest.h b/ndn-cpp/c/interest.h
index c3a1647..42b9c62 100644
--- a/ndn-cpp/c/interest.h
+++ b/ndn-cpp/c/interest.h
@@ -49,7 +49,7 @@
 };
 /**
  * Initialize an ndn_Exclude struct with the entries array.
- * @param self pointer to the ndn_Exclude struct
+ * @param self A pointer to the ndn_Exclude struct.
  * @param entries the pre-allocated array of ndn_ExcludeEntry
  * @param maxEntries the number of elements in the allocated entries array
  */
@@ -69,6 +69,14 @@
  */
 int ndn_Exclude_compareComponents(struct ndn_NameComponent *component1, struct ndn_NameComponent *component2);
 
+/**
+ * Check if the component matches any of the exclude criteria.
+ * @param self A pointer to the ndn_Exclude struct.
+ * @param component A pointer to the name component to check.
+ * @return 1 if the component matches any of the exclude criteria, otherwise 0.
+ */
+int ndn_Exclude_matches(struct ndn_Exclude *self, struct ndn_NameComponent *component);
+
 enum {
   ndn_Interest_CHILD_SELECTOR_LEFT = 0,
   ndn_Interest_CHILD_SELECTOR_RIGHT = 1,
