aboutsummaryrefslogtreecommitdiffstats
path: root/utility.h
diff options
context:
space:
mode:
Diffstat (limited to 'utility.h')
-rw-r--r--utility.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/utility.h b/utility.h
index c829b85..fd6917e 100644
--- a/utility.h
+++ b/utility.h
@@ -62,6 +62,18 @@ namespace flask
is_valid(s, i+1, f);
}
+ constexpr bool is_equ_p(const char* a, const char* b, unsigned n)
+ {
+ return
+ *a == 0 || *b == 0
+ ? false :
+ n == 0
+ ? true :
+ *a != *b
+ ? false :
+ is_equ_p(a+1, b+1, n-1);
+ }
+
constexpr bool is_equ_n(const_str a, unsigned ai, const_str b, unsigned bi, unsigned n)
{
return