Files
MonsterCards/iOS/Pods/OCHamcrest/Source/Library/Text/HCStringStartsWith.m
Tom Hicks c3031fbc39 Adds cocoapods for libraries.
Adds OCMockito and OCHamcrest libs.
2020-09-05 22:06:51 -07:00

29 lines
508 B
Objective-C

// OCHamcrest by Jon Reid, https://qualitycoding.org/
// Copyright 2019 hamcrest.org. See LICENSE.txt
#import "HCStringStartsWith.h"
@implementation HCStringStartsWith
- (BOOL)matches:(nullable id)item
{
if (![item respondsToSelector:@selector(hasPrefix:)])
return NO;
return [item hasPrefix:self.substring];
}
- (NSString *)relationship
{
return @"starting with";
}
@end
id HC_startsWith(NSString *prefix)
{
return [[HCStringStartsWith alloc] initWithSubstring:prefix];
}