From a9be2d378b7ad84e679a48efa81f42fb54f85d9a Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Wed, 15 Jul 2015 15:37:57 -0700 Subject: Drop release v2.6.0+no-stlport Bug 246391 Change-Id: I662b7b0f90c97cb169978e1b64ad1fe32c440cf5 Signed-off-by: Jean-Michel Trivi --- utility/Utility.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'utility/Utility.h') diff --git a/utility/Utility.h b/utility/Utility.h index 51f796f..93acd82 100644 --- a/utility/Utility.h +++ b/utility/Utility.h @@ -33,6 +33,7 @@ #include #include #include +#include class CUtility { @@ -62,5 +63,21 @@ public: std::string& strOutput, const std::string& strItemSeparator = ", ", const std::string& strKeyValueSeparator = ":"); -}; + /** Utility to easily convert a builtin type into string + * + * FIXME: Should be replaced by std::to_string after C++11 introduction + */ + template + static std::string toString(T uiValue) + { + std::ostringstream ostr; + + ostr << uiValue; + + return ostr.str(); + } + + /** Utility to underline */ + static void appendTitle(std::string& strTo, const std::string& strTitle); +}; -- cgit v1.1