fixed and improved
This commit is contained in:
@@ -29,7 +29,7 @@ public:
|
||||
const char* getCharArray() const { return body.c_str(); }
|
||||
const string& getBody() const { return body; }
|
||||
size_t getLength() const { return body.size(); }
|
||||
bool isEmpty() const { return body.size() != 0; }
|
||||
bool isEmpty() const { return body.size() == 0; }
|
||||
bool contains(const String& s) const { return body.find(s.getBody()) != string::npos; }
|
||||
bool operator==(const String& s) const { return body == s.getBody(); }
|
||||
|
||||
@@ -68,4 +68,4 @@ public:
|
||||
|
||||
String operator+(const String& a, const String& b) {
|
||||
return String((a.getBody() + b.getBody()).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user