diff --git a/base/include/util/string.h b/base/include/util/string.h index e106ada0f..412933483 100644 --- a/base/include/util/string.h +++ b/base/include/util/string.h @@ -480,6 +480,12 @@ namespace Genode { return (_length <= CAPACITY) && (_buf[_length - 1] == '\0'); } char const *string() const { return valid() ? _buf : ""; } + + template + bool operator == (String const &other) const + { + return strcmp(string(), other.string()) == 0; + } }; }