07-14-2011، 10:52 AM
کد:
function Randomstring(strLen: Integer): string;
var
str: string;
begin
Randomize;
str := 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ';
Result := '';
repeat
Result := Result + str[Random(Length(str)) + 1];
until (Length(Result) = strLen)
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
//generate a string with 10 chars
showmessage( Randomstring(10));
end;
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg