- Timestamp:
- Jan 17, 2011, 6:55:36 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/UCommon.pas
r123 r129 4 4 5 5 uses 6 Windows, Classes, SysUtils, SpecializedList ; //, ShFolder, ShellAPI;6 Windows, Classes, SysUtils, SpecializedList, StrUtils; //, ShFolder, ShellAPI; 7 7 8 8 type 9 9 TArrayOfByte = array of Byte; 10 10 TArrayOfString = array of string; 11 TExceptionEvent = procedure(Sender: TObject; E: Exception) of object; 11 12 12 13 TUserNameFormat = ( … … 22 23 unfDNSDomainName = 11); 23 24 25 var 26 ExceptionHandler: TExceptionEvent; 24 27 25 28 function IntToBin(Data: Cardinal; Count: Byte): string; … … 38 41 procedure SetBit(var Variable: Word; Index: Byte; State: Boolean); 39 42 function AddLeadingZeroes(const aNumber, Length : integer) : string; 43 function LastPos(const SubStr: String; const S: String): Integer; 40 44 41 45 implementation … … 65 69 end;*) 66 70 71 function LastPos(const SubStr: String; const S: String): Integer; 72 begin 73 Result := Pos(ReverseString(SubStr), ReverseString(S)); 74 if (Result <> 0) then 75 Result := ((Length(S) - Length(SubStr)) + 1) - Result + 1; 76 end; 77 67 78 function BCDToInt(Value: Byte): Byte; 68 79 begin
Note:
See TracChangeset
for help on using the changeset viewer.