mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 23:48:08 -05:00
Merge branch '1.2.0-dev' of https://github.com/geode-sdk/geode into 1.2.0-dev
This commit is contained in:
commit
e67f59548f
1 changed files with 16 additions and 0 deletions
|
@ -118,9 +118,25 @@ namespace gd {
|
|||
return m_data.m_length;
|
||||
}
|
||||
|
||||
bool operator<(const gd::string& other) const {
|
||||
return std::string_view(this->c_str(), this->size()) < std::string_view(other.c_str(), other.size());
|
||||
}
|
||||
|
||||
bool empty() const {
|
||||
return this->size() == 0;
|
||||
}
|
||||
|
||||
operator bool() const {
|
||||
return !this->empty();
|
||||
}
|
||||
|
||||
operator std::string() const {
|
||||
return std::string(this->c_str(), this->size());
|
||||
}
|
||||
|
||||
operator std::string_view() const {
|
||||
return std::string_view(this->c_str(), this->size());
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
|
|
Loading…
Reference in a new issue