From fadadd2d92f96bf8bbb2b5727e2de3284486ebf3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 5 Oct 2006 06:11:53 +0000 Subject: [PATCH] string fixups --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40307 --- sourcehook/sh_string.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sourcehook/sh_string.h b/sourcehook/sh_string.h index 83a6923..54ef6e1 100755 --- a/sourcehook/sh_string.h +++ b/sourcehook/sh_string.h @@ -51,6 +51,16 @@ public: assign(src.c_str()); } + bool operator ==(const String &other) + { + return (compare(other.c_str()) == 0); + } + + bool operator ==(const char *other) + { + return (compare(other) == 0); + } + const char *c_str() { return v?v:""; } const char *c_str() const { return v?v:""; }