亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gtest-string.h

?? Search s framework 老外寫的
?? H
字號:
// Copyright 2005, Google Inc.// All rights reserved.//// Redistribution and use in source and binary forms, with or without// modification, are permitted provided that the following conditions are// met:////     * Redistributions of source code must retain the above copyright// notice, this list of conditions and the following disclaimer.//     * Redistributions in binary form must reproduce the above// copyright notice, this list of conditions and the following disclaimer// in the documentation and/or other materials provided with the// distribution.//     * Neither the name of Google Inc. nor the names of its// contributors may be used to endorse or promote products derived from// this software without specific prior written permission.//// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.//// Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)//// The Google C++ Testing Framework (Google Test)//// This header file declares the String class and functions used internally by// Google Test.  They are subject to change without notice. They should not used// by code external to Google Test.//// This header file is #included by testing/base/internal/gtest-internal.h.// It should not be #included by other files.#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_#include <string.h>#include <gtest/internal/gtest-port.h>#if GTEST_HAS_GLOBAL_STRING || GTEST_HAS_STD_STRING#include <string>#endif  // GTEST_HAS_GLOBAL_STRING || GTEST_HAS_STD_STRINGnamespace testing {namespace internal {// String - a UTF-8 string class.//// We cannot use std::string as Microsoft's STL implementation in// Visual C++ 7.1 has problems when exception is disabled.  There is a// hack to work around this, but we've seen cases where the hack fails// to work.//// Also, String is different from std::string in that it can represent// both NULL and the empty string, while std::string cannot represent// NULL.//// NULL and the empty string are considered different.  NULL is less// than anything (including the empty string) except itself.//// This class only provides minimum functionality necessary for// implementing Google Test.  We do not intend to implement a full-fledged// string class here.//// Since the purpose of this class is to provide a substitute for// std::string on platforms where it cannot be used, we define a copy// constructor and assignment operators such that we don't need// conditional compilation in a lot of places.//// In order to make the representation efficient, the d'tor of String// is not virtual.  Therefore DO NOT INHERIT FROM String.class String { public:  // Static utility methods  // Returns the input if it's not NULL, otherwise returns "(null)".  // This function serves two purposes:  //  // 1. ShowCString(NULL) has type 'const char *', instead of the  // type of NULL (which is int).  //  // 2. In MSVC, streaming a null char pointer to StrStream generates  // an access violation, so we need to convert NULL to "(null)"  // before streaming it.  static inline const char* ShowCString(const char* c_str) {    return c_str ? c_str : "(null)";  }  // Returns the input enclosed in double quotes if it's not NULL;  // otherwise returns "(null)".  For example, "\"Hello\"" is returned  // for input "Hello".  //  // This is useful for printing a C string in the syntax of a literal.  //  // Known issue: escape sequences are not handled yet.  static String ShowCStringQuoted(const char* c_str);  // Clones a 0-terminated C string, allocating memory using new.  The  // caller is responsible for deleting the return value using  // delete[].  Returns the cloned string, or NULL if the input is  // NULL.  //  // This is different from strdup() in string.h, which allocates  // memory using malloc().  static const char* CloneCString(const char* c_str);#ifdef _WIN32_WCE  // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be  // able to pass strings to Win32 APIs on CE we need to convert them  // to 'Unicode', UTF-16.  // Creates a UTF-16 wide string from the given ANSI string, allocating  // memory using new. The caller is responsible for deleting the return  // value using delete[]. Returns the wide string, or NULL if the  // input is NULL.  //  // The wide string is created using the ANSI codepage (CP_ACP) to  // match the behaviour of the ANSI versions of Win32 calls and the  // C runtime.  static LPCWSTR AnsiToUtf16(const char* c_str);  // Creates an ANSI string from the given wide string, allocating  // memory using new. The caller is responsible for deleting the return  // value using delete[]. Returns the ANSI string, or NULL if the  // input is NULL.  //  // The returned string is created using the ANSI codepage (CP_ACP) to  // match the behaviour of the ANSI versions of Win32 calls and the  // C runtime.  static const char* Utf16ToAnsi(LPCWSTR utf16_str);#endif  // Compares two C strings.  Returns true iff they have the same content.  //  // Unlike strcmp(), this function can handle NULL argument(s).  A  // NULL C string is considered different to any non-NULL C string,  // including the empty string.  static bool CStringEquals(const char* lhs, const char* rhs);  // Converts a wide C string to a String using the UTF-8 encoding.  // NULL will be converted to "(null)".  If an error occurred during  // the conversion, "(failed to convert from wide string)" is  // returned.  static String ShowWideCString(const wchar_t* wide_c_str);  // Similar to ShowWideCString(), except that this function encloses  // the converted string in double quotes.  static String ShowWideCStringQuoted(const wchar_t* wide_c_str);  // Compares two wide C strings.  Returns true iff they have the same  // content.  //  // Unlike wcscmp(), this function can handle NULL argument(s).  A  // NULL C string is considered different to any non-NULL C string,  // including the empty string.  static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);  // Compares two C strings, ignoring case.  Returns true iff they  // have the same content.  //  // Unlike strcasecmp(), this function can handle NULL argument(s).  // A NULL C string is considered different to any non-NULL C string,  // including the empty string.  static bool CaseInsensitiveCStringEquals(const char* lhs,                                           const char* rhs);  // Compares two wide C strings, ignoring case.  Returns true iff they  // have the same content.  //  // Unlike wcscasecmp(), this function can handle NULL argument(s).  // A NULL C string is considered different to any non-NULL wide C string,  // including the empty string.  // NB: The implementations on different platforms slightly differ.  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE  // environment variable. On GNU platform this method uses wcscasecmp  // which compares according to LC_CTYPE category of the current locale.  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the  // current locale.  static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,                                               const wchar_t* rhs);  // Formats a list of arguments to a String, using the same format  // spec string as for printf.  //  // We do not use the StringPrintf class as it is not universally  // available.  //  // The result is limited to 4096 characters (including the tailing  // 0).  If 4096 characters are not enough to format the input,  // "<buffer exceeded>" is returned.  static String Format(const char* format, ...);  // C'tors  // The default c'tor constructs a NULL string.  String() : c_str_(NULL) {}  // Constructs a String by cloning a 0-terminated C string.  String(const char* c_str) : c_str_(NULL) {  // NOLINT    *this = c_str;  }  // Constructs a String by copying a given number of chars from a  // buffer.  E.g. String("hello", 3) will create the string "hel".  String(const char* buffer, size_t len);  // The copy c'tor creates a new copy of the string.  The two  // String objects do not share content.  String(const String& str) : c_str_(NULL) {    *this = str;  }  // D'tor.  String is intended to be a final class, so the d'tor  // doesn't need to be virtual.  ~String() { delete[] c_str_; }  // Allows a String to be implicitly converted to an ::std::string or  // ::string, and vice versa.  Converting a String containing a NULL  // pointer to ::std::string or ::string is undefined behavior.  // Converting a ::std::string or ::string containing an embedded NUL  // character to a String will result in the prefix up to the first  // NUL character.#if GTEST_HAS_STD_STRING  String(const ::std::string& str) : c_str_(NULL) { *this = str.c_str(); }  operator ::std::string() const { return ::std::string(c_str_); }#endif  // GTEST_HAS_STD_STRING#if GTEST_HAS_GLOBAL_STRING  String(const ::string& str) : c_str_(NULL) { *this = str.c_str(); }  operator ::string() const { return ::string(c_str_); }#endif  // GTEST_HAS_GLOBAL_STRING  // Returns true iff this is an empty string (i.e. "").  bool empty() const {    return (c_str_ != NULL) && (*c_str_ == '\0');  }  // Compares this with another String.  // Returns < 0 if this is less than rhs, 0 if this is equal to rhs, or > 0  // if this is greater than rhs.  int Compare(const String& rhs) const;  // Returns true iff this String equals the given C string.  A NULL  // string and a non-NULL string are considered not equal.  bool operator==(const char* c_str) const {    return CStringEquals(c_str_, c_str);  }  // Returns true iff this String is less than the given C string.  A NULL  // string is considered less than "".  bool operator<(const String& rhs) const { return Compare(rhs) < 0; }  // Returns true iff this String doesn't equal the given C string.  A NULL  // string and a non-NULL string are considered not equal.  bool operator!=(const char* c_str) const {    return !CStringEquals(c_str_, c_str);  }  // Returns true iff this String ends with the given suffix.  *Any*  // String is considered to end with a NULL or empty suffix.  bool EndsWith(const char* suffix) const;  // Returns true iff this String ends with the given suffix, not considering  // case. Any String is considered to end with a NULL or empty suffix.  bool EndsWithCaseInsensitive(const char* suffix) const;  // Returns the length of the encapsulated string, or -1 if the  // string is NULL.  int GetLength() const {    return c_str_ ? static_cast<int>(strlen(c_str_)) : -1;  }  // Gets the 0-terminated C string this String object represents.  // The String object still owns the string.  Therefore the caller  // should NOT delete the return value.  const char* c_str() const { return c_str_; }  // Sets the 0-terminated C string this String object represents.  // The old string in this object is deleted, and this object will  // own a clone of the input string.  This function copies only up to  // length bytes (plus a terminating null byte), or until the first  // null byte, whichever comes first.  //  // This function works even when the c_str parameter has the same  // value as that of the c_str_ field.  void Set(const char* c_str, size_t length);  // Assigns a C string to this object.  Self-assignment works.  const String& operator=(const char* c_str);  // Assigns a String object to this object.  Self-assignment works.  const String& operator=(const String &rhs) {    *this = rhs.c_str_;    return *this;  } private:  const char* c_str_;};// Streams a String to an ostream.inline ::std::ostream& operator <<(::std::ostream& os, const String& str) {  // We call String::ShowCString() to convert NULL to "(null)".  // Otherwise we'll get an access violation on Windows.  return os << String::ShowCString(str.c_str());}// Gets the content of the StrStream's buffer as a String.  Each '\0'// character in the buffer is replaced with "\\0".String StrStreamToString(StrStream* stream);// Converts a streamable value to a String.  A NULL pointer is// converted to "(null)".  When the input value is a ::string,// ::std::string, ::wstring, or ::std::wstring object, each NUL// character in it is replaced with "\\0".// Declared here but defined in gtest.h, so that it has access// to the definition of the Message class, required by the ARM// compiler.template <typename T>String StreamableToString(const T& streamable);}  // namespace internal}  // namespace testing#endif  // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产手机| 欧美亚洲国产bt| 秋霞电影网一区二区| 亚洲精品伦理在线| 国产精品乱码一区二区三区软件| 欧美tk丨vk视频| 91精品国产91久久综合桃花| 欧美精品v国产精品v日韩精品| 欧美色综合网站| 欧美一区二区在线播放| 日韩一级黄色片| 日韩欧美你懂的| 国产欧美日韩中文久久| 国产拍揄自揄精品视频麻豆| 中国色在线观看另类| 中文字幕一区二区不卡| 国产精品久久久久久亚洲伦 | 欧美日韩一二三| 色综合色狠狠综合色| 欧美亚洲日本国产| 欧美在线看片a免费观看| 亚洲成av人片在线观看无码| 欧美一区二区网站| 国产真实乱偷精品视频免| 国产欧美一区二区精品仙草咪| 欧美大片国产精品| 国产农村妇女毛片精品久久麻豆| 亚洲18影院在线观看| 色欧美片视频在线观看 | 日韩欧美综合一区| 国产风韵犹存在线视精品| 欧美mv日韩mv国产| 日韩av电影免费观看高清完整版 | 欧美大白屁股肥臀xxxxxx| 香蕉乱码成人久久天堂爱免费| 99re6这里只有精品视频在线观看| 欧美国产日韩a欧美在线观看| 韩国三级在线一区| xvideos.蜜桃一区二区| 国产一区二区三区免费播放| 精品人伦一区二区色婷婷| 青青草国产成人99久久| 欧美一区二区免费| 国产一区二区三区黄视频 | 国产精品嫩草影院av蜜臀| 丁香天五香天堂综合| 中国色在线观看另类| 91网站在线播放| 亚洲一区在线看| 欧美一区二区三区免费在线看 | 韩国视频一区二区| 久久噜噜亚洲综合| 懂色av一区二区三区免费观看 | 成人在线综合网| 综合色中文字幕| 欧美日韩在线播放三区四区| 青青草91视频| 国产精品久久看| 欧美在线影院一区二区| 免费久久99精品国产| 国产喷白浆一区二区三区| 91在线观看美女| 五月天中文字幕一区二区| 精品日韩一区二区| 成人激情小说乱人伦| 亚洲在线视频网站| 欧美精品一区二区在线播放| 高清在线成人网| 亚洲在线成人精品| 欧美xxxx在线观看| 91激情五月电影| 另类欧美日韩国产在线| 中文字幕中文字幕在线一区 | 91麻豆免费看| 日韩av不卡在线观看| 国产精品毛片大码女人| 欧美日韩国产另类一区| 国产成人亚洲综合a∨婷婷图片| 亚洲成人综合在线| 久久婷婷综合激情| 欧美群妇大交群中文字幕| 成人免费视频免费观看| 午夜欧美在线一二页| 中文字幕乱码亚洲精品一区| 欧美一区在线视频| 91香蕉视频黄| 国产酒店精品激情| 日韩高清不卡在线| 亚洲欧美激情一区二区| 日韩欧美视频一区| 欧美日韩成人在线一区| 成人av在线电影| 国产在线视频一区二区| 奇米777欧美一区二区| 亚洲综合丝袜美腿| 国产精品久久久久久久久果冻传媒 | 99久久久精品| 麻豆精品精品国产自在97香蕉| 久久精品人人做人人综合| 这里只有精品电影| 在线精品国精品国产尤物884a | 亚洲自拍偷拍麻豆| 国产欧美日韩综合| 精品91自产拍在线观看一区| 欧洲国内综合视频| 色偷偷成人一区二区三区91| 国产91精品一区二区| 免费观看久久久4p| 天天色综合成人网| 亚洲一区二区高清| 亚洲男女一区二区三区| 中文字幕日韩一区二区| 国产精品理论片在线观看| 精品国产一区二区精华| 精品日韩在线观看| 精品国产一区二区三区四区四| 欧美在线高清视频| 欧美日韩国产天堂| 91精品婷婷国产综合久久竹菊| 欧美日韩国产影片| 91精品欧美综合在线观看最新| 91精品国产综合久久小美女| 精品视频1区2区3区| 欧美日韩国产精选| 91麻豆精品国产91久久久久| 欧美日韩夫妻久久| 日韩网站在线看片你懂的| 日韩一级免费观看| 精品99999| 国产精品久久久久久久裸模| 亚洲情趣在线观看| 亚洲成人7777| 日日夜夜精品视频免费| 久久福利视频一区二区| 成人一区二区三区视频| 99久久99久久精品免费看蜜桃| 91一区一区三区| 欧美三级日韩三级国产三级| 欧美日韩视频在线观看一区二区三区 | 1000部国产精品成人观看| 精品写真视频在线观看 | 国产精品每日更新在线播放网址| 国产精品久久免费看| 亚洲免费毛片网站| 日本一区二区三区四区在线视频| 精品久久久久一区二区国产| 国产性做久久久久久| 亚洲少妇30p| 亚洲国产人成综合网站| 国产一区二区在线影院| 91在线视频免费观看| 91精选在线观看| 国产三级久久久| 亚洲成人先锋电影| 国产一区二区三区av电影 | 久久精品国产精品亚洲综合| 国产超碰在线一区| 色综合久久99| 久久精品视频一区二区三区| 亚洲乱码国产乱码精品精98午夜| 日本va欧美va精品发布| 99热在这里有精品免费| 欧美一级艳片视频免费观看| 国产日韩欧美在线一区| 天堂av在线一区| av电影一区二区| 日韩三级在线免费观看| 亚洲欧美日韩中文字幕一区二区三区| 日韩av一区二区在线影视| aaa欧美色吧激情视频| 精品剧情在线观看| 一区二区三区在线影院| 国内精品第一页| 在线观看不卡一区| 国产精品久久久久毛片软件| 久久91精品国产91久久小草| 在线欧美小视频| 中文字幕日韩一区二区| 国产91高潮流白浆在线麻豆 | 久久精品视频网| 亚洲一区自拍偷拍| 国产成人av一区| 精品国产一区二区精华| 日韩不卡一区二区三区| 欧美丝袜丝nylons| 亚洲精品一卡二卡| jlzzjlzz国产精品久久| 久久精品日韩一区二区三区| 麻豆精品国产91久久久久久| 欧美三级电影精品| 亚洲柠檬福利资源导航| 不卡视频在线观看| 国产网红主播福利一区二区| 麻豆精品一二三| 欧美精品一级二级| 婷婷中文字幕一区三区| 欧美日韩黄色影视| 天天综合色天天综合| 在线播放视频一区| 日韩中文字幕91|