Skip to content

Commit

Permalink
rpc::string add empty method
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Dec 15, 2023
1 parent 7b78dec commit 70570ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rpc/serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ namespace rpc
const char* c_str() const { return cbegin(); }
std::string_view sv() const { return {c_str(), size() - 1}; }
std::string to_std() { return std::string(sv()); };
bool empty() const { return _len == 0; }
bool operator==(const string& rhs) const { return sv() == rhs.sv(); }
bool operator!=(const string& rhs) const { return !(*this == rhs); }
bool operator<(const string& rhs) const { return sv() < rhs.sv(); }
Expand Down

0 comments on commit 70570ee

Please sign in to comment.