SRL Archive - Non-RuneScape Scripts

Word "Capitalizer"


sm321

2012-05-22 05:16:48

Hello :) I am looking for another script, but this one is a bit more complicated. I am looking for something that does this:

    Has an input function
  • Takes the given words and randomizes the case of the letter
  • E.g. If the input was

Hello
Villavu


The output would be

hEllO
vILLavU


Thankyou.

Dgby714

2012-05-22 05:36:28

function randomCase(const s: string): string;
var
L, I: LongInt;
begin
Result := '';

L := Length(s);
for I := 1 to L do
case Random(2) of
0: Result := Result + Uppercase(s[i]);
1: Result := Result + Lowercase(s[i]);
end;
end;

sm321

2012-05-22 05:56:33

From: Dgby714
function randomCase(const s: string): string;
var
L, I: LongInt;
begin
Result := '';

L := Length(s);
for I := 1 to L do
case Random(2) of
0: Result := Result + Uppercase(s[i]);
1: Result := Result + Lowercase(s[i]);
end;
end;


Thankyou :)