mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Fix for #243
This commit is contained in:
parent
61d14215fa
commit
ae72ee4593
3 changed files with 22 additions and 2 deletions
|
@ -1019,15 +1019,22 @@ GSICUStringMatchesRegex(NSString *string, NSString *regex, NSStringCompareOption
|
|||
#endif
|
||||
case NSBeginsWithPredicateOperatorType:
|
||||
{
|
||||
NSRange range = NSMakeRange(0, [rightResult length]);
|
||||
NSRange range;
|
||||
NSUInteger ll = [leftResult length];
|
||||
NSUInteger rl = [rightResult length];
|
||||
|
||||
if (rl > ll)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
range = NSMakeRange(0, rl);
|
||||
return ([leftResult compare: rightResult
|
||||
options: compareOptions
|
||||
range: range] == NSOrderedSame ? YES : NO);
|
||||
}
|
||||
case NSEndsWithPredicateOperatorType:
|
||||
{
|
||||
NSRange range;
|
||||
NSRange range;
|
||||
NSUInteger ll = [leftResult length];
|
||||
NSUInteger rl = [rightResult length];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue