// OCHamcrest by Jon Reid, https://qualitycoding.org/ // Copyright 2019 hamcrest.org. See LICENSE.txt #import NS_ASSUME_NONNULL_BEGIN /*! * @abstract Tests string starts with a substring. */ @interface HCStringStartsWith : HCSubstringMatcher @end FOUNDATION_EXPORT id HC_startsWith(NSString *prefix); #ifndef HC_DISABLE_SHORT_SYNTAX /*! * @abstract Creates a matcher that matches when the examined object is a string that starts with * the specified string. * @param prefix The substring that the returned matcher will expect at the start of any examined * string. (Must not be nil.) * @discussion The matcher invokes -hasPrefix: on the examined object, passing the * specified prefix. * * Example
*
assertThat(\@"myStringOfNote", startsWith(\@"my"))
* * Name Clash
* In the event of a name clash, #define HC_DISABLE_SHORT_SYNTAX and use the synonym * HC_startsWith instead. */ static inline id startsWith(NSString *prefix) { return HC_startsWith(prefix); } #endif NS_ASSUME_NONNULL_END