From 09abf1b529b4226f585ecfbb20866715b901755b Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 1 Dec 2021 13:34:22 +0800 Subject: +fpm --- .../fpm/3rdparty/googlebench/src/string_util.h | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Client/ThirdParty/fpm/3rdparty/googlebench/src/string_util.h (limited to 'Client/ThirdParty/fpm/3rdparty/googlebench/src/string_util.h') diff --git a/Client/ThirdParty/fpm/3rdparty/googlebench/src/string_util.h b/Client/ThirdParty/fpm/3rdparty/googlebench/src/string_util.h new file mode 100644 index 0000000..e70e769 --- /dev/null +++ b/Client/ThirdParty/fpm/3rdparty/googlebench/src/string_util.h @@ -0,0 +1,40 @@ +#ifndef BENCHMARK_STRING_UTIL_H_ +#define BENCHMARK_STRING_UTIL_H_ + +#include +#include +#include +#include "internal_macros.h" + +namespace benchmark { + +void AppendHumanReadable(int n, std::string* str); + +std::string HumanReadableNumber(double n, double one_k = 1024.0); + +std::string StrFormat(const char* format, ...); + +inline std::ostream& StrCatImp(std::ostream& out) BENCHMARK_NOEXCEPT { + return out; +} + +template +inline std::ostream& StrCatImp(std::ostream& out, First&& f, + Rest&&... rest) { + out << std::forward(f); + return StrCatImp(out, std::forward(rest)...); +} + +template +inline std::string StrCat(Args&&... args) { + std::ostringstream ss; + StrCatImp(ss, std::forward(args)...); + return ss.str(); +} + +void ReplaceAll(std::string* str, const std::string& from, + const std::string& to); + +} // end namespace benchmark + +#endif // BENCHMARK_STRING_UTIL_H_ -- cgit v1.1-26-g67d0