Make more CTL fixes

This commit is contained in:
Justine Tunney 2024-07-01 07:10:35 -07:00
parent 61370983e1
commit d0cd719375
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
4 changed files with 122 additions and 15 deletions

View file

@ -332,6 +332,18 @@ class string
return *this;
}
string& operator+=(const char* s) noexcept
{
append(s);
return *this;
}
string& operator+=(const ctl::string s) noexcept
{
append(s);
return *this;
}
string& operator+=(const ctl::string_view s) noexcept
{
append(s);
@ -344,6 +356,11 @@ class string
return strcat(*this, s);
}
string operator+(const char* s) const noexcept
{
return strcat(*this, s);
}
string operator+(const string& s) const noexcept
{
return strcat(*this, s);
@ -354,11 +371,6 @@ class string
return strcat(*this, s);
}
string operator+(const char* s) const noexcept
{
return strcat(*this, s);
}
int compare(const ctl::string_view s) const noexcept
{
return strcmp(*this, s);