mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Add containsString: implementation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39731 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
542825f621
commit
a4200029bd
4 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-05-06 18:03-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Headers/Foundation/NSString.h: Add containsString:
|
||||
* Headers/GNUstepBase/GSVersionMacros.h: Add 10.10 and 10.11 macros.
|
||||
* Source/NSString.m: Add containsString: implementation.
|
||||
|
||||
2016-04-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSAutoreleasePool.m:
|
||||
|
|
|
@ -835,6 +835,15 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10,GS_API_LATEST)
|
||||
|
||||
/**
|
||||
* Returns YES if the receiver contains string, otherwise, NO.
|
||||
*/
|
||||
- (BOOL) containsString: (NSString *)string;
|
||||
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
+ (Class) constantStringClass;
|
||||
#endif /* GS_API_NONE */
|
||||
|
|
|
@ -61,6 +61,8 @@
|
|||
#define MAC_OS_X_VERSION_10_7 1070
|
||||
#define MAC_OS_X_VERSION_10_8 1080
|
||||
#define MAC_OS_X_VERSION_10_9 1090
|
||||
#define MAC_OS_X_VERSION_10_10 1100
|
||||
#define MAC_OS_X_VERSION_10_11 1110
|
||||
#endif /* MAC_OS_X_VERSION_10_0 */
|
||||
|
||||
/* Allow MAC_OS_X_VERSION_MAX_ALLOWED to be used in place of GS_OPENSTEP_V
|
||||
|
|
|
@ -6082,6 +6082,14 @@ static NSFileManager *fm = nil;
|
|||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns YES if the receiver contains string, otherwise, NO.
|
||||
*/
|
||||
- (BOOL) containsString: (NSString *)string
|
||||
{
|
||||
return [self rangeOfString: string].location != NSNotFound;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue