[Lazarus] How can I increment/decrement a alphanumeric value?

silvioprog silvioprog at gmail.com
Sat Aug 21 15:59:44 CEST 2010


  uses
   StrUtils;

function IncStr(const AString: string; const ADigits: Byte = 3): string;
begin
   Result := Dec2Numb(Numb2Dec(AString, 36) + 1, ADigits, 36);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
   Edit2.Text := IncStr(Edit1.Text);
end;

Thats all ;)

Silvio Clécio




More information about the Lazarus mailing list