|
@@ -357,31 +357,18 @@ implementation
|
|
|
end;
|
|
|
|
|
|
|
|
|
- function CompareWideString(const s1, s2 : WideString) : PtrInt;
|
|
|
+ function CompareWideString(const s1, s2 : WideString; Options : TCompareOptions) : PtrInt;
|
|
|
var
|
|
|
cfstr1, cfstr2: CFStringRef;
|
|
|
temp1, temp2: RawByteString;
|
|
|
begin
|
|
|
cfstr1:=CFStringCreateFromWideDataOptionallyViaUUTF8String(pwidechar(s1),length(s1),temp1);
|
|
|
cfstr2:=CFStringCreateFromWideDataOptionallyViaUUTF8String(pwidechar(s2),length(s2),temp2);
|
|
|
- result:=CompareCFStrings(cfstr1,cfstr2,false);
|
|
|
+ result:=CompareCFStrings(cfstr1,cfstr2,coIgnoreCase in Options);
|
|
|
CFRelease(cfstr1);
|
|
|
CFRelease(cfstr2);
|
|
|
end;
|
|
|
|
|
|
- function CompareTextWideString(const s1, s2 : WideString): PtrInt;
|
|
|
- var
|
|
|
- cfstr1, cfstr2: CFStringRef;
|
|
|
- temp1, temp2: RawByteString;
|
|
|
- begin
|
|
|
- cfstr1:=CFStringCreateFromWideDataOptionallyViaUUTF8String(pwidechar(s1),length(s1),temp1);
|
|
|
- cfstr2:=CFStringCreateFromWideDataOptionallyViaUUTF8String(pwidechar(s2),length(s2),temp2);
|
|
|
- result:=CompareCFStrings(cfstr1,cfstr2,true);
|
|
|
- CFRelease(cfstr1);
|
|
|
- CFRelease(cfstr2);
|
|
|
- end;
|
|
|
-
|
|
|
-
|
|
|
function InternalCodePointLength(const Str: PChar; cfcp: CFStringEncoding; maxlookahead: ptrint): PtrInt;
|
|
|
var
|
|
|
cfstr: CFStringRef;
|
|
@@ -610,7 +597,6 @@ implementation
|
|
|
LowerWideStringProc:=@LowerWideString;
|
|
|
|
|
|
CompareWideStringProc:=@CompareWideString;
|
|
|
- CompareTextWideStringProc:=@CompareTextWideString;
|
|
|
|
|
|
CharLengthPCharProc:=@CharLengthPChar;
|
|
|
CodePointLengthProc:=@CodePointLength;
|
|
@@ -633,7 +619,6 @@ implementation
|
|
|
UpperUnicodeStringProc:=@UpperWideString;
|
|
|
LowerUnicodeStringProc:=@LowerWideString;
|
|
|
CompareUnicodeStringProc:=@CompareWideString;
|
|
|
- CompareTextUnicodeStringProc:=@CompareTextWideString;
|
|
|
{ CodePage }
|
|
|
GetStandardCodePageProc:=@GetStandardCodePage;
|
|
|
end;
|