Changeset 577 for Common/Common.pas


Ignore:
Timestamp:
Aug 2, 2024, 9:14:09 AM (3 months ago)
Author:
chronos
Message:
  • Modified: Updated Common packaged.
  • Fixed: Fullscreen switching on Linux and Windows with newer Lazarus version.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/Common.pas

    r568 r577  
    5353function ComputerName: string;
    5454procedure DeleteFiles(APath, AFileSpec: string);
     55function EndsWith(Text, What: string): Boolean;
    5556function Explode(Separator: Char; Data: string): TStringArray;
    5657procedure ExecuteProgram(Executable: string; Parameters: array of string);
     
    8788procedure SearchFiles(AList: TStrings; Dir: string;
    8889  FilterMethod: TFilterMethod = nil; FileNameMethod: TFileNameMethod = nil);
     90procedure SortStrings(Strings: TStrings);
    8991function SplitString(var Text: string; Count: Word): string;
    9092function StripTags(const S: string): string;
     93function StartsWith(Text, What: string): Boolean;
    9194function TryHexToInt(Data: string; out Value: Integer): Boolean;
    9295function TryBinToInt(Data: string; out Value: Integer): Boolean;
    93 procedure SortStrings(Strings: TStrings);
    9496
    9597
    9698implementation
     99
     100function StartsWith(Text, What: string): Boolean;
     101begin
     102  Result := Copy(Text, 1, Length(Text)) = What;
     103end;
     104
     105function EndsWith(Text, What: string): Boolean;
     106begin
     107  Result := Copy(Text, Length(Text) - Length(What) + 1, MaxInt) = What;
     108end;
    97109
    98110function BinToInt(BinStr : string) : Int64;
Note: See TracChangeset for help on using the changeset viewer.