summaryrefslogtreecommitdiff
path: root/src/util/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/string.h')
-rw-r--r--src/util/string.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/string.h b/src/util/string.h
index 1cb4ae8d8..d9390e33c 100644
--- a/src/util/string.h
+++ b/src/util/string.h
@@ -163,6 +163,12 @@ inline s32 mystoi(const std::string &s, s32 min, s32 max)
return i;
}
+inline s64 stoi64(const std::string &s) {
+ std::stringstream tmp(s);
+ long long t;
+ tmp >> t;
+ return t;
+}
// MSVC2010 includes it's own versions of these
//#if !defined(_MSC_VER) || _MSC_VER < 1600
@@ -200,6 +206,12 @@ inline std::string itos(s32 i)
return o.str();
}
+inline std::string i64tos(s64 i) {
+ std::ostringstream o;
+ o<<i;
+ return o.str();
+}
+
inline std::string ftos(float f)
{
std::ostringstream o;