|
@@ -221,11 +221,21 @@ begin
|
|
Result:=CompareText(S1,S2)=0;
|
|
Result:=CompareText(S1,S2)=0;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$ifndef FPC_NOGENERICANSIROUTINES}
|
|
{==============================================================================}
|
|
{==============================================================================}
|
|
{ Ansi string functions }
|
|
{ Ansi string functions }
|
|
{ these functions rely on the character set loaded by the OS }
|
|
{ these functions rely on the character set loaded by the OS }
|
|
{==============================================================================}
|
|
{==============================================================================}
|
|
|
|
|
|
|
|
+type
|
|
|
|
+ TCaseTranslationTable = array[0..255] of char;
|
|
|
|
+
|
|
|
|
+var
|
|
|
|
+ { Tables with upper and lowercase forms of character sets.
|
|
|
|
+ MUST be initialized with the correct code-pages }
|
|
|
|
+ UpperCaseTable: TCaseTranslationTable;
|
|
|
|
+ LowerCaseTable: TCaseTranslationTable;
|
|
|
|
+
|
|
function GenericAnsiUpperCase(const s: string): string;
|
|
function GenericAnsiUpperCase(const s: string): string;
|
|
var
|
|
var
|
|
len, i: integer;
|
|
len, i: integer;
|
|
@@ -282,18 +292,6 @@ begin
|
|
Result:=L1-L2;
|
|
Result:=L1-L2;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function AnsiSameText(const s1,s2:String):Boolean;{$ifdef SYSUTILSINLINE}inline;{$endif}
|
|
|
|
-
|
|
|
|
-begin
|
|
|
|
- AnsiSameText:=AnsiCompareText(S1,S2)=0;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
-function AnsiSameStr(const s1,s2:String):Boolean;{$ifdef SYSUTILSINLINE}inline;{$endif}
|
|
|
|
-
|
|
|
|
-begin
|
|
|
|
- AnsiSameStr:=AnsiCompareStr(S1,S2)=0;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
function GenericAnsiStrComp(S1, S2: PChar): PtrInt;
|
|
function GenericAnsiStrComp(S1, S2: PChar): PtrInt;
|
|
|
|
|
|
begin
|
|
begin
|
|
@@ -423,6 +421,19 @@ if Str <> Nil then begin
|
|
end ;
|
|
end ;
|
|
end ;
|
|
end ;
|
|
end ;
|
|
end ;
|
|
|
|
+{$endif FPC_NOGENERICANSIROUTINES}
|
|
|
|
+
|
|
|
|
+function AnsiSameText(const s1,s2:String):Boolean;{$ifdef SYSUTILSINLINE}inline;{$endif}
|
|
|
|
+
|
|
|
|
+begin
|
|
|
|
+ AnsiSameText:=AnsiCompareText(S1,S2)=0;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+function AnsiSameStr(const s1,s2:String):Boolean;{$ifdef SYSUTILSINLINE}inline;{$endif}
|
|
|
|
+
|
|
|
|
+begin
|
|
|
|
+ AnsiSameStr:=AnsiCompareStr(S1,S2)=0;
|
|
|
|
+end;
|
|
|
|
|
|
function AnsiLastChar(const S: string): PChar;
|
|
function AnsiLastChar(const S: string): PChar;
|
|
|
|
|
|
@@ -2601,12 +2612,13 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+{$ifndef FPC_NOGENERICANSIROUTINES}
|
|
{
|
|
{
|
|
Case Translation Tables
|
|
Case Translation Tables
|
|
Can be used in internationalization support.
|
|
Can be used in internationalization support.
|
|
|
|
|
|
Although these tables can be obtained through system calls
|
|
Although these tables can be obtained through system calls
|
|
- it is better to not use those, since most implementation are not 100%
|
|
|
|
|
|
+cd it is better to not use those, since most implementation are not 100%
|
|
WARNING:
|
|
WARNING:
|
|
before modifying a translation table make sure that the current codepage
|
|
before modifying a translation table make sure that the current codepage
|
|
of the OS corresponds to the one you make changes to
|
|
of the OS corresponds to the one you make changes to
|
|
@@ -2659,6 +2671,7 @@ const
|
|
#240, #241, #242, #243, #244, #245, #246, #247,
|
|
#240, #241, #242, #243, #244, #245, #246, #247,
|
|
#248, #249, #250, #251, #252, #253, #254, #255 );
|
|
#248, #249, #250, #251, #252, #253, #254, #255 );
|
|
|
|
|
|
|
|
+{$endif FPC_NOGENERICANSIROUTINES}
|
|
|
|
|
|
function sscanf(const s: string; const fmt : string;const Pointers : array of Pointer) : Integer;
|
|
function sscanf(const s: string; const fmt : string;const Pointers : array of Pointer) : Integer;
|
|
var
|
|
var
|