2013-12-05 10:49:28 +00:00
|
|
|
unit X2UtDelphiCompatibility;
|
|
|
|
|
|
|
|
interface
|
|
|
|
uses
|
|
|
|
SysUtils;
|
|
|
|
|
|
|
|
|
|
|
|
function CharInSet(C: Char; const CharSet: TSysCharSet): Boolean;
|
|
|
|
function GetDefaultFormatSettings: TFormatSettings;
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
2013-12-06 12:41:38 +00:00
|
|
|
{$IF CompilerVersion < 20}
|
|
|
|
uses
|
|
|
|
Windows;
|
2013-12-06 13:09:39 +00:00
|
|
|
{$IFEND}
|
2013-12-05 10:49:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
function CharInSet(C: Char; const CharSet: TSysCharSet): Boolean;
|
|
|
|
begin
|
|
|
|
{$IF CompilerVersion < 20}
|
|
|
|
Result := C in CharSet;
|
|
|
|
{$ELSE}
|
|
|
|
Result := SysUtils.CharInSet(C, CharSet);
|
|
|
|
{$IFEND}
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function GetDefaultFormatSettings: TFormatSettings;
|
|
|
|
begin
|
|
|
|
{$IF CompilerVersion < 20}
|
|
|
|
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, Result);
|
|
|
|
{$ELSE}
|
|
|
|
Result := TFormatSettings.Create;
|
|
|
|
{$IFEND}
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|