summaryrefslogtreecommitdiff
path: root/include/libHX/string.h
diff options
context:
space:
mode:
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)
{