- Timestamp:
- Jan 26, 2011, 7:28:29 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/UCommon.pas
r129 r146 42 42 function AddLeadingZeroes(const aNumber, Length : integer) : string; 43 43 function LastPos(const SubStr: String; const S: String): Integer; 44 function GenerateNewName(OldName: string): string; 44 45 45 46 implementation 47 48 function GenerateNewName(OldName: string): string; 49 var 50 I: Integer; 51 Number: Integer; 52 begin 53 Number := 1; 54 // Find number on end 55 if Length(OldName) > 0 then begin 56 I := Length(OldName); 57 while (I > 1) and ((OldName[I] >= '0') and (OldName[I] <= '9')) do Dec(I); 58 TryStrToInt(Copy(OldName, I + 1, Length(OldName) - I), Number); 59 Inc(Number) 60 end; 61 Result := Copy(OldName, 1, I) + IntToStr(Number); 62 end; 46 63 47 64 (*function DelTree(DirName : string): Boolean;
Note:
See TracChangeset
for help on using the changeset viewer.