34 #ifndef GTEST_SAMPLES_SAMPLE2_H_ 35 #define GTEST_SAMPLES_SAMPLE2_H_ 43 const char* c_string_;
58 explicit MyString(
const char* a_c_string) : c_string_(NULL) {
64 Set(
string.c_string_);
74 const char*
c_string()
const {
return c_string_; }
77 return c_string_ == NULL ? 0 : strlen(c_string_);
85 #endif // GTEST_SAMPLES_SAMPLE2_H_ static const char * CloneCString(const char *a_c_string)
Definition: sample2.cc:39
~MyString()
Definition: sample2.h:71
MyString(const MyString &string)
Definition: sample2.h:63
size_t Length() const
Definition: sample2.h:76
MyString()
Definition: sample2.h:55
void Set(const char *c_string)
Definition: sample2.cc:51
const char * c_string() const
Definition: sample2.h:74
MyString(const char *a_c_string)
Definition: sample2.h:58