#ifndef HELPER_STR_H #define HELPER_STR_H #include "globals.h" #include namespace ExtStr { //! Numbers to strings in a platform independent and safe, but not necessarly the fastest way. //! \param imbueUserLocale_: When true the numbers are formated according to users locale settings //! (that's stuff like spacing, so given "123000.23" a german number can look like "123.000,23") std::wstring num2wstr(int val_, bool imbueUserLocale_=false); std::wstring num2wstr(long val_, bool imbueUserLocale_=false); std::wstring num2wstr(long64 val_, bool imbueUserLocale_=false); std::wstring num2wstr(double val_, bool imbueUserLocale_=false); std::string num2str(int val_, bool imbueUserLocale_=false); std::string num2str(long val_, bool imbueUserLocale_=false); std::string num2str(long64 val_, bool imbueUserLocale_=false); std::string num2str(double val_, bool imbueUserLocale_=false); // convert between utf8 and widestrings. std::wstring FromUtf8(const std::string& utf8string_); std::string ToUtf8(const std::wstring& widestring_); std::string ToUtf8(const wchar_t* widestring_); // convert string characters void ToUpper(std::string &string_); void ToLower(std::string &string_); }; #endif // HELPER_STR_H