mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-31 17:52:27 +00:00
Make more CTL fixes
This commit is contained in:
parent
61370983e1
commit
d0cd719375
4 changed files with 122 additions and 15 deletions
22
ctl/string.h
22
ctl/string.h
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue