mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-14 05:08:19 +00:00
base: char const * comparison operators for String
This commit is contained in:
committed by
Christian Helmuth
parent
a528aa097a
commit
96d021b9d4
@ -524,6 +524,16 @@ class Genode::String
|
|||||||
|
|
||||||
char const *string() const { return valid() ? _buf : ""; }
|
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>
|
template <size_t OTHER_CAPACITY>
|
||||||
bool operator == (String<OTHER_CAPACITY> const &other) const
|
bool operator == (String<OTHER_CAPACITY> const &other) const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user