summaryrefslogtreecommitdiffstats
path: root/proxy/src/gp_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'proxy/src/gp_common.c')
-rw-r--r--proxy/src/gp_common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/proxy/src/gp_common.c b/proxy/src/gp_common.c
index f4ebc5e..19253dc 100644
--- a/proxy/src/gp_common.c
+++ b/proxy/src/gp_common.c
@@ -35,3 +35,15 @@ bool gp_same(const char *a, const char *b)
return false;
}
+
+bool gp_boolean_is_true(const char *s)
+{
+ if (strcasecmp(s, "1") == 0 ||
+ strcasecmp(s, "on") == 0 ||
+ strcasecmp(s, "true") == 0 ||
+ strcasecmp(s, "yes") == 0) {
+ return true;
+ }
+
+ return false;
+}