mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-18 17:00:26 +00:00
base: char const * comparison operators for String
This commit is contained in:
parent
a528aa097a
commit
96d021b9d4
@ -524,6 +524,16 @@ class Genode::String
|
||||
|
||||
char const *string() const { return valid() ? _buf : ""; }
|
||||
|
||||
bool operator == (char const *other) const
|
||||
{
|
||||
return strcmp(string(), other) == 0;
|
||||
}
|
||||
|
||||
bool operator != (char const *other) const
|
||||
{
|
||||
return strcmp(string(), other) != 0;
|
||||
}
|
||||
|
||||
template <size_t OTHER_CAPACITY>
|
||||
bool operator == (String<OTHER_CAPACITY> const &other) const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user