From 96d021b9d40b50f3492928ce3d08b005e6253c2a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 5 Oct 2015 15:42:24 +0200 Subject: [PATCH] base: char const * comparison operators for String --- repos/base/include/util/string.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/repos/base/include/util/string.h b/repos/base/include/util/string.h index ac975bac6..50a0bb72a 100644 --- a/repos/base/include/util/string.h +++ b/repos/base/include/util/string.h @@ -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 bool operator == (String const &other) const {