   

function AnsiEq( const S1, S2: String ): Boolean; 
 true,  AnsiLowerCase (S1) = AnsiLowerCase(S2) .  2    .       .

function DelimiterLast( const Str, Delimiters: String ): Integer; 
    Str    Delimiters        .  Delimiters     Str. 

function AnsiUpperCase( const S: string ): string; 
    S   . 

function AnsiLowerCase( const S: string ): string; 
    S   . 

function AnsiCompareStr( const S1, S2: string ): Integer; 
   ANSI S1  S2   .   < 0,  S1 < S2, 0,  S1 = S2,  > 0,  S1 > S2. 

function _AnsiCompareStr( S1, S2: PChar ): Integer; 
 AnsiCompareStr   PChar. 

function CopyEnd( const S: String; Idx: Integer ): String; 
    S  Idx    

function CopyTail( const S: String; Len: Integer ): String; 
  Len    S.  Len > Length( S ),    S. 

procedure DeleteTail( var S: String; Len: Integer ); 
  Len   . 

function LowerCase( const S: string ): string; 
    S   .    . 

procedure NormalizeUnixText( var S: String ); 
  S     #10   #13 

function IndexOfChar( const S: String; Chr: Char ): Integer; 
   Chr   S.      1  Length(S),   -1    . 

function IndexOfCharsMin( const S, Chars: String ): Integer; 
    ()  Chr   S.   -1    . 

function IndexOfStr( const S, Sub: String ): Integer; 
   Sub   S.      1  Length(S)-Length(Sub),   -1    . 

function Parse( var S: String; const Separators: String ): String; 
    S  Separators         (..  Separators).   S      Separators. 
..  S= '1-2-3', Separators= '-'       '1' ,  S='2-3' 
  S  Separators     S,   S  c. 

function StrEq( const S1, S2: String ): Boolean; 
 true,  LowerCase (S1) = LowerCase(S2) .  2    .       . 

function StrIn( const S: String; A: array of String ): Boolean; 
  True          S.      StrEq       . 

function StrSatisfy( const S, Mask: String ): Boolean; 
 True   S   Mask.  Mask    '*' (   )  '?' (  ).      S    : 
StrSatisfy(S,'*@*.*'); 

function StrReplace( var S: String; const From, ReplTo: String ): Boolean; 
    S    From   ReplTo.      True. 

function StrPCopy( Dest: PChar; const Source: string ): PChar; 
      PChar 

function StrLCopy( Dest: PChar; const Source: PChar; MaxLen: Cardinal ): PChar; 
  MaxLen        PChar. 

function StrComp( const Str1, Str2: PChar ): Integer; 
  2- .   -1: Str1<Str2; 0: Str1=Str2; +1: Str1>Str2 

function StrLComp( const Str1, Str2: PChar; MaxLen: Cardinal ): Integer; 
  MaxLen    Str1  Str2   .   < 0,  Str1 < Str2, 0,  Str1 = Str2,  > 0,  Str1 > Str2. 

function StrCopy( Dest, Source: PChar ): PChar; 
     Source  Dest   Dest. 

function StrLen( const Str: PChar ): Cardinal; 
      Str,     . 

function StrScanLen( Str: PChar; Chr: Char; Len: Integer ): PChar; 
   Str  Len       Chr .  Chr    Str,  nil. 

function StrScan( Str: PChar; Chr: Char ): PChar; 
         Str   . 

function StrRScan( const Str: PChar; Chr: Char ): PChar; 
      Chr   Str.  Chr    Str,  nil. 

function StrIsStartingFrom( Str, Pattern: PChar ): Boolean; 
 True   Str    Pattern,    Copy( Str, 1, StrLen( Pattern ) ) = Pattern 

procedure Str2LowerCase( S: PChar ); 
   -    . 

function TrimLeft( const S: string ): string; 
    S     

function TrimRight( const S: string ): string; 
    S    . 

function Trim( const S: string ): string; 
       S    . 

function UpperCase( const S: string ): string; 
    S   .    . 

function WStrReplace( var S: WideString; const From, ReplTo: WideString ): Boolean; 
    S    From   ReplTo.      True.   StrReplace   WideString (  Delphi 2  ) 

function WStrLen( W: PWideChar ): Integer; 
    PWideChar. 

procedure WStrCopy( Dest, Src: PWideChar ); 
  Dest  PWideChar  Src 

function WStrCmp( W1, W2: PWideChar ): Integer; 
 2-   PWideChar.       StrComp 

function Clipboard2Text: String; 
    . 

function Text2Clipboard( const S: String ): Boolean; 
     


  

function DirectoryExists( const Name: string ): Boolean; 
 Tue   . 

function DirectoryEmpty( Name: String ): Boolean; 
 Tue    . 

function DirectoryHasSubdirs( const Path: String ): Boolean; 
 True   Path     . 

function CheckDirectoryContent( const Path: String; SubDirsOnly: Boolean; const Mask: String ): Boolean; 
 TRUE   Path    (     SubDirsOnly = true)   . 

function IncludeTrailingPathDelimiter( const S: string ): string; 
  '\'        . 

function ExcludeTrailingPathDelimiter( const S: string ): string; 
     '\'    . 

procedure ForceDirectories( Dir: String ); 
  Dir    .         . 

function CreateDir( const Dir: string ): Boolean; 
 . 

function ExtractShortPathName( const Path: String ): String; 
     .     
D:\Program Files\Borland\Delphi 3   
D:\PROGRA~1\BORLAND\DELPHI~1 

function ExtractFileNameWOext( const Path: String ): String; 
         . 
       
D:\Program Files\Borland\Delphi 3\prog\api.txt 
  : api 

function FileFullPath( const FileName: String ): String; 
     . 

function FileShortPath( const FileName: String ): String; 
     . 

function FileSize( const Path: String ): Integer; 
   

function GetUniqueFilename( PathName: string ): String; 
       PathName.     aaa.txt     aaa1.txt , aaa2.txt ... 

function DiskFreeSpace( const Path: String ): Int64; 
    .  Path      ,  : 'C:\'. 

  

function Int2Hex( Value: DWord; Digits: Integer ): String; 
 Value  integer         .  Digits     

function Int2Str( Value: Integer ): String; 
 Value  integer   

function Int2Ths( I: Integer ): String; 
 Value  integer  .     : ',' (     ). 

function Int2Digs( Value, Digits: Integer ): String; 
 integer  string. Digits -      .  Digits     Value     . 

function Num2Bytes( Value: Double ): String; 
 Value     ,  Value   .  Value  ,      (  K  ),   (M),  (G)   (T). 

function Str2Int( const Value: String ): Integer; 
 Value  string  integer. 

function Hex2Int( const Value: String ): Integer; 
    integer. Value         . 

           : 
function Str2Double( const S: String ): Double; 
function Double2Str( D: Double ): String; 
function Int64_2Str( X: Int64 ): String; 
function Str2Int64( const S: String ): Int64; 
function Int64_2Double( const X: Int64 ): Double; 
function Double2Int64( D: Double ): Int64;  


 

procedure MsgOK( const S: String ); 
      .    Applet.Caption ( 'Error'  Applet  ) 

function ShowMsg( const S: String; Flags: DWORD ): DWORD; 
   MessageBox.    Flags       Win32.hlp      (  ). 

procedure ShowMessage( const S: String ); 
ShowMsg  Flags  MB_OK or MB_SETFOREGROUND. 

procedure ShowMsgModal( const S: String ); 
   ,          .     400          .       'Information'. 

function SysErrorMessage( ErrorCode: Integer ): string; 
   ,      .           . ,       : ShowMsg( SysErrorMessage( GetLastError ) ); 

   API MessageBox  KOL ShowMsg  
                                                  
MB_ABORTRETRYIGNORE               IDABORT 
MB_APPLMODAL                             IDCANCEL 
MB_DEFAULT_DESKTOP_ONLY       IDIGNORE 
MB_DEFBUTTON1                            IDNO
MB_DEFBUTTON2                            IDOK 
MB_DEFBUTTON3                            IDRETRY
MB_DEFBUTTON4                            IDYES
MB_HELP 
MB_ICONASTERISK 
MB_ICONERROR 
MB_ICONEXCLAMATION 
MB_ICONHAND 
MB_ICONINFORMATION 
MB_ICONQUESTION 
MB_ICONSTOP 
MB_ICONWARNING 
MB_OK 
MB_OKCANCEL 
MB_RETRYCANCEL 
MB_RIGHT 
MB_RTLREADING 
MB_SERVICE_NOTIFICATION 
MB_SETFOREGROUND 
MB_SYSTEMMODAL 
MB_TASKMODAL 
MB_YESNO 
MB_YESNOCANCEL 


     

function Now: TDateTime; 
       . TDateTime  KOL      VCL . TDateTime        (.. Double),      ,     ,      24- , ..       . 

function CompareSystemTime( const D1, D2: TSystemTime ): Integer; 
  2-   TSystemTime.  : 
-1  D1 < D2 
0  D1 = D2 
1  D1 > D2. 
TSystemTime -    Winddows API       . IMHO        TDateTime. 
      Win32.hlp,  ... 
    : GetSystemTime 
      : SetSystemTime 

type 
PSystemTime = ^TSystemTime; 
   TSystemTime = record 
   wYear: Word; //  
   wMonth: Word; //  
   wDayOfWeek: Word; //   
   wDay: Word; //  
   wHour: Word; //  
   wMinute: Word; //  
   wSecond: Word; //  
   wMilliseconds: Word; //  
end; 

procedure IncDays( var SystemTime: TSystemTime; DaysNum: Integer ); 
        TSystemTime. DaysNum   . 

procedure IncMonths( var SystemTime: TSystemTime; MonthsNum: Integer ); 
        TSystemTime. DaysNum   .            

function IsLeapYear( Year: Word ): Boolean; . 
 true    Year   (   29   ). 

function DayOfWeek( Date: TDateTime ): Integer; 
   ( 0  6)   . 


function SystemTime2DateTime( const SystemTime: TSystemTime; var DateTime: TDateTime ): Boolean; 
    TSystemTime  TDateTime 

function DateTime2SystemTime( const DateTime: TDateTime; var SystemTime: TSystemTime ): Boolean; 
    TDateTime  TSystemTime. 

function CatholicEaster( nYear: Integer ): TDateTime; 
       
 

  
