From d28026d78e233fdfcbdb69e8f30b23a1f16db9c2 Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 23 Feb 2005 18:18:24 +0000 Subject: [PATCH] added -hasPrefix:/-hasSuffix: to NSNull git-svn-id: http://svn.opengroupware.org/SOPE/trunk@592 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/NGExtensions/ChangeLog | 5 +++++ .../NGExtensions/FdExt.subproj/NSNull+misc.m | 15 +++++++++------ sope-core/NGExtensions/Version | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index 3d86def5..b7472a9f 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,8 @@ +2005-02-23 Helge Hess + + * FdExt.subproj/NSNull+misc.m: added -hasPrefix: / -hasSuffix:, should + fix OGo bug #1080 (v4.5.152) + 2005-02-21 Helge Hess * FdExt.subproj/NSString+URLEscaping.m: changed to escape '+' chars diff --git a/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m b/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m index 63e2a92e..f74b968b 100644 --- a/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m +++ b/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m @@ -95,12 +95,15 @@ static inline BOOL doAbort(void) { } - (BOOL)isEqualToString:(NSString *)_s { -#if DEBUG - NSLog(@"WARNING(%s): " - @"called NSNull -isEqualToString:!!!", - __PRETTY_FUNCTION__); - if (doAbort()) abort(); -#endif + /* Note: I think we can keep this as a regular method */ + return _s == (id)self || _s == nil ? YES : NO; +} +- (BOOL)hasPrefix:(NSString *)_s { + /* Note: I think we can keep this as a regular method */ + return _s == (id)self || _s == nil ? YES : NO; +} +- (BOOL)hasSuffix:(NSString *)_s { + /* Note: I think we can keep this as a regular method */ return _s == (id)self || _s == nil ? YES : NO; } diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index 238d2be0..8a5c4492 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,6 +1,6 @@ # version -SUBMINOR_VERSION:=151 +SUBMINOR_VERSION:=152 # v4.3.115 requires libFoundation v1.0.59 # v4.2.72 requires libEOControl v4.2.39 -- 2.39.5