mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
NSString: Fix -commonPrefixWithString:options: behaviour (#455)
* Update changelog * NSString: fix -commonPrefixWithString:options: behaviour * NSString: More test cases
This commit is contained in:
parent
01b719f2af
commit
f940412e0e
4 changed files with 53 additions and 0 deletions
|
@ -3227,6 +3227,11 @@ register_printf_atsign ()
|
|||
- (NSString*) commonPrefixWithString: (NSString*)aString
|
||||
options: (NSUInteger)mask
|
||||
{
|
||||
// Return empty string to match behaviour on macOS
|
||||
if (nil == aString)
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
if (mask & NSLiteralSearch)
|
||||
{
|
||||
int prefix_len = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue