mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
util/string.h: String::operator ==
This commit is contained in:
committed by
Christian Helmuth
parent
bdfbe9f20e
commit
332aeba844
@@ -480,6 +480,12 @@ namespace Genode {
|
||||
return (_length <= CAPACITY) && (_buf[_length - 1] == '\0'); }
|
||||
|
||||
char const *string() const { return valid() ? _buf : ""; }
|
||||
|
||||
template <size_t OTHER_CAPACITY>
|
||||
bool operator == (String<OTHER_CAPACITY> const &other) const
|
||||
{
|
||||
return strcmp(string(), other.string()) == 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user