Merge pull request #3055 from daboe01/cpstring+-containsString

fixed: CPString did not have containsString:
This commit is contained in:
daboe01
2023-12-21 19:19:49 +01:00
committed by GitHub
+10
View File
@@ -570,6 +570,16 @@ var CPStringNull = [CPNull null];
return aString && aString != "" && self.indexOf(aString) == 0;
}
/*!
Returns \c YES if the receiver contains
the specified string. If \c aString
is empty, the method will return \c NO.
*/
- (BOOL)containsString:(CPString)aString
{
return aString && aString != "" && self.indexOf(aString) >= 0;
}
/*!
Returns \c YES if the receiver ends
with the specified string. If \c aString