SRL Archive - SRL Archives

MakeFirstCapital - For item finding!


Abyssal

2007-06-25 18:04:01


function MakeFirstCapital(ItemName: string): string;
begin
Result:= (Uppercase(Copy(ItemName, 0, 1)));
Delete(ItemName, 1, 1);
Result:= Result + ItemName;
end;

So, if the user inputs their log type as 'yew' and you try to search for that, in the UpText, and it is uppercased ("Yew") then you can use this to avoid it!

Yea… :O

Starblaster100

2007-06-25 18:07:24


program New;
begin
Writeln(Capitalize('hello'));
end.

:)

Janilabo

2007-06-25 18:44:34

Yeah, but Star…

begin
Writeln(Capitalize('hello there'));
end.

returns

Hello There

..and…

function MakeFirstCapital(ItemName: string): string;
begin
Result:= (Uppercase(Copy(ItemName, 0, 1)));
Delete(ItemName, 1, 1);
Result:= Result + ItemName;
end;

begin
Writeln(MakeFirstCapital('hello there'));
end.

returns

Hello there

:p

BTW, good job Abyssal :)

Abyssal

2007-06-25 19:24:11

Bah, I knew there'd be a sneaky procedure hidden from me!

Santa_Clause

2007-06-25 20:56:59

I'm a noob at this. Why don't we just use lowercase?

From what I know, lowercase takes the runescape text and makes it all into lowercase, suiting the user's needs just like uppercase..?

WhiteShadow

2007-06-25 21:11:28

From: SantaClause
I'm a noob at this. Why don't we just use lowercase?

From what I know, lowercase takes the runescape text and makes it all into lowercase, suiting the user's needs just like uppercase..?


Lowercase, lower cases the SCAR strings, not Runescape bitmap mask characters.

the scar noob

2007-06-26 14:50:04

From: SantaClause
I'm a noob at this. Why don't we just use lowercase?

From what I know, lowercase takes the runescape text and makes it all into lowercase, suiting the user's needs just like uppercase..?


wasn't the purpose to make the first letter you put in a Capital?