mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
String: Define operator>(String)
This commit is contained in:
parent
fbdd0def47
commit
96f9e6a64f
Notes:
sideshowbarker
2024-07-19 11:37:46 +09:00
Author: https://github.com/awesomekling
Commit: 96f9e6a64f
1 changed files with 11 additions and 0 deletions
|
@ -44,6 +44,17 @@ bool String::operator<(const String& other) const
|
||||||
return strcmp(characters(), other.characters()) < 0;
|
return strcmp(characters(), other.characters()) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool String::operator>(const String& other) const
|
||||||
|
{
|
||||||
|
if (!m_impl)
|
||||||
|
return other.m_impl;
|
||||||
|
|
||||||
|
if (!other.m_impl)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return strcmp(characters(), other.characters()) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
String String::empty()
|
String String::empty()
|
||||||
{
|
{
|
||||||
return StringImpl::the_empty_stringimpl();
|
return StringImpl::the_empty_stringimpl();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue