I use the multiple rename tool very often and would love to see an option-checkbox for a roman counter that does count and insert like:
I
II
III
IV
V
...
here is an example delphi sourcecode:
Code: Select all
function DecToRoman(Decimal: Longint): String;
const
Romans: Array[1..16] of String = ('I', 'IV', 'V', 'IX', 'X', 'XL',
'L', 'XC', 'C', 'CD', 'D', 'CM',
'M', '(M)', '[M]', '{M}');
Arabics: Array[1..16] of Integer = (1, 4, 5, 9, 10, 40, 50, 90, 100,
400, 500, 900, 1000, 10000, 100000, 1000000);
var
iFor: Integer;
begin
Result := '';
for iFor := 16 downto 1 do
begin
while(Decimal >= Arabics[iFor]) do
begin
Decimal := Decimal - Arabics[iFor];
Result := Result + Romans[iFor];
end;
end;
end;
delphipraxis[dot]net[slash]post51339[dot]html
greetz from berlin
Konrad H.