MINOR: pattern: import acl_find_match_name() into pattern.h

It's only dedicated to pattern match lookups, so it was renamed
pat_find_match_name().
diff --git a/include/proto/pattern.h b/include/proto/pattern.h
index ee7518c..29773f8 100644
--- a/include/proto/pattern.h
+++ b/include/proto/pattern.h
@@ -22,6 +22,8 @@
 #ifndef _PROTO_PATTERN_H
 #define _PROTO_PATTERN_H
 
+#include <string.h>
+
 #include <common/config.h>
 #include <common/standard.h>
 #include <types/pattern.h>
@@ -41,6 +43,17 @@
  */
 int pattern_register(struct pattern_expr *expr, char *text, struct sample_storage *smp, struct pattern **pattern, int patflags, char **err);
 
+/* return the PAT_MATCH_* index for match name "name", or < 0 if not found */
+static inline int pat_find_match_name(const char *name)
+{
+	int i;
+
+	for (i = 0; i < PAT_MATCH_NUM; i++)
+		if (strcmp(name, pat_match_names[i]) == 0)
+			return i;
+	return -1;
+}
+
 /* This function executes a pattern match on a sample. It applies pattern <expr>
  * to sample <smp>. If <sample> is not NULL, a pointer to an optional sample
  * associated to the matching patterned will be put there. The function returns