From 58841ef12f6cba1bb622353c1fcaa0e3c6fb46c9 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Tue, 23 Oct 2012 01:18:44 +0400 Subject: Add dummy and LevelDB database backends --- src/util/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/util/string.h') 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<