Форум: "Основная";
Текущий архив: 2002.02.04;
Скачать: [xml.tar.bz2];
ВнизГенератор паролей Найти похожие ветки
← →
Фэ (2002-01-16 14:55) [1]Вот что-то похожее.
function RandomRangeString_(Lmin,Lmax: Integer; Up:Boolean): String;
var
x,sl: integer;
begin
result := sNULL;
sl := RandomInteger_(Lmin,Lmax); {длина строки от Lmin до Lmax}
while Length(result) <= sl do begin
x := Byte(RandomInteger_(32, 255)); {общий диапазон символов}
if chr(x) in LatChars then {фильтр}
result := result + chr(x);
end;
if Length(result) > Lmax then
result := Copy(result, 1, Lmax);
if Up then Result := AnsiUpperCase(Result);
end;
function RandomInteger_(iLow, iHigh: Integer): Integer;
begin
result := Trunc(Random(iHigh - iLow)) + iLow;
end;
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.02.04;
Скачать: [xml.tar.bz2];
Память: 0.43 MB
Время: 0.004 c