123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
- #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
- #ifdef __BORLANDC__
- # include <mem.h>
- #endif
- #include <string.h>
- #include <cstdint>
- #include <string>
- #include "gtest/internal/gtest-port.h"
- namespace testing {
- namespace internal {
- class GTEST_API_ String {
- public:
-
-
-
-
-
-
-
-
- static const char* CloneCString(const char* c_str);
- #if GTEST_OS_WINDOWS_MOBILE
-
-
-
-
-
-
-
-
-
-
-
- static LPCWSTR AnsiToUtf16(const char* c_str);
-
-
-
-
-
-
-
-
- static const char* Utf16ToAnsi(LPCWSTR utf16_str);
- #endif
-
-
-
-
-
-
- static bool CStringEquals(const char* lhs, const char* rhs);
-
-
-
-
- static std::string ShowWideCString(const wchar_t* wide_c_str);
-
-
-
-
-
-
- static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);
-
-
-
-
-
-
- static bool CaseInsensitiveCStringEquals(const char* lhs,
- const char* rhs);
-
-
-
-
-
-
-
-
-
-
-
-
- static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
- const wchar_t* rhs);
-
-
- static bool EndsWithCaseInsensitive(
- const std::string& str, const std::string& suffix);
-
- static std::string FormatIntWidth2(int value);
-
- static std::string FormatIntWidthN(int value, int width);
-
- static std::string FormatHexInt(int value);
-
- static std::string FormatHexUInt32(uint32_t value);
-
- static std::string FormatByte(unsigned char value);
- private:
- String();
- };
- GTEST_API_ std::string StringStreamToString(::std::stringstream* stream);
- }
- }
- #endif
|