summaryrefslogtreecommitdiff
path: root/include/libHX/string.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:04:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:04:00 +0200
commit3422d8db505630a70bc89a4eee7db927b8e5ec2f (patch)
treef0c6e1ba7db9991f2bd38c9169f9921bfe5e61d8 /include/libHX/string.h
parentdf5167db909a88fb8e16dd20b37442495a6ac059 (diff)
parentaab49e5a013c53ae812a143fe41add74e0677a61 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'include/libHX/string.h')
-rw-r--r--include/libHX/string.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/libHX/string.h b/include/libHX/string.h
index 4dc4c11..9e78cd0 100644
--- a/include/libHX/string.h
+++ b/include/libHX/string.h
@@ -28,9 +28,17 @@ enum {
HXQUOTE_URIENC,
HXQUOTE_SQLSQUOTE,
HXQUOTE_SQLBQUOTE,
+ HXQUOTE_BASE64URL,
+ HXQUOTE_BASE64IMAP,
_HXQUOTE_MAX,
};
+enum {
+ HXUNIT_YEARS = 0x1U,
+ HXUNIT_MONTHS = 0x2U,
+ HXUNIT_WEEKS = 0x4U,
+};
+
#ifndef __libhx_internal_hxmc_t_defined
#define __libhx_internal_hxmc_t_defined 1
typedef char hxmc_t;
@@ -90,6 +98,12 @@ extern size_t HX_strrtrim(char *);
extern char *HX_strsep(char **, const char *);
extern char *HX_strsep2(char **, const char *);
extern char *HX_strupper(char *);
+extern double HX_strtod_unit(const char *, char **, unsigned int exponent);
+extern unsigned long long HX_strtoull_unit(const char *, char **, unsigned int exponent);
+extern char *HX_unit_size(char *out, size_t bufsize, unsigned long long size, unsigned int divisor, unsigned int cutoff);
+extern char *HX_unit_size_cu(char *out, size_t bufsize, unsigned long long size, unsigned int divisor);
+extern unsigned long long HX_strtoull_sec(const char *s, char **);
+extern char *HX_unit_seconds(char *out, size_t bufsize, unsigned long long seconds, unsigned int flags);
static __inline__ void *HX_memdup(const void *buf, size_t len)
{