diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-03-16 16:31:42 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2015-03-16 16:31:42 +0200 |
commit | 037bbc245f57e45f9e6f56c705957e38586d7218 (patch) | |
tree | 6b90908065e2399b0f5b85acf546a6bf35f1533b /src/url.h | |
parent | 29ecdb6a8fc035eae3fdcc66c491c77af8e3429b (diff) |
splitted netdata to multiple source files
Diffstat (limited to 'src/url.h')
-rwxr-xr-x | src/url.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/url.h b/src/url.h new file mode 100755 index 0000000000..f79a20ea0c --- /dev/null +++ b/src/url.h @@ -0,0 +1,22 @@ +#ifndef NETDATA_URL_H +#define NETDATA_URL_H 1 + +// ---------------------------------------------------------------------------- +// URL encode / decode +// code from: http://www.geekhideout.com/urlcode.shtml + +/* Converts a hex character to its integer value */ +extern char from_hex(char ch); + +/* Converts an integer value to its hex character*/ +extern char to_hex(char code); + +/* Returns a url-encoded version of str */ +/* IMPORTANT: be sure to free() the returned string after use */ +extern char *url_encode(char *str); + +/* Returns a url-decoded version of str */ +/* IMPORTANT: be sure to free() the returned string after use */ +extern char *url_decode(char *str); + +#endif /* NETDATA_URL_H */ |