From 82aac86edff8e35ed7c0c2560ef5cde8b3111fc6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 7 Nov 2003 00:02:03 +0000 Subject: change (Const)String::c_str to never return 0 (rather return empty string) -> can be used to simplify code. Also don't use stricmp in />= operators, it is inconsisten with == and != operators svn-id: r11169 --- common/str.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/str.h') diff --git a/common/str.h b/common/str.h index a4570bead8..2c18c75554 100644 --- a/common/str.h +++ b/common/str.h @@ -66,7 +66,7 @@ public: return _str[idx]; } - const char *c_str() const { return _str; } + const char *c_str() const { return _str ? _str : ""; } int size() const { return _len; } bool isEmpty() const { return (_len == 0); } -- cgit v1.2.3