summaryrefslogtreecommitdiff
path: root/FacebookRM/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'FacebookRM/utils.h')
-rw-r--r--FacebookRM/utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/FacebookRM/utils.h b/FacebookRM/utils.h
index 6d9acb5..868aeb8 100644
--- a/FacebookRM/utils.h
+++ b/FacebookRM/utils.h
@@ -65,6 +65,7 @@ namespace utils
namespace url
{
std::string encode(const std::string &s);
+ std::string decode(std::string data);
};
namespace time
@@ -96,6 +97,12 @@ namespace utils
namespace conversion
{
std::string to_string( void*, WORD type );
+
+ template <class T>
+ bool from_string(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&)) {
+ std::istringstream iss(s);
+ return !(iss >> f >> t).fail();
+ }
};
namespace debug