Changing String

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Changing String

Post by Aero »

function StringConv takes string s returns string
local integer i=StringLength(s)
local string r=""
loop
exitwhen i=0
if SubString(s,i-1,i)=="a"then
set r="b"+r
else
set r=SubString(s,i-1,i)+r
endif
set i=i-1
endloop
return r
endfunction
User avatar
JJ2197
Legendary Genius
Posts: 1311
Joined: August 8th, 2007, 8:10 am
Title: Legendary Genius²
Location: St. George Utah

Re: Changing String

Post by JJ2197 »

Weirdone2 already solved this for me... =/
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: Changing String

Post by Aero »

Nothing wrong with another way to do the same thing.

Besides, mine's 1 less line of code.
User avatar
JJ2197
Legendary Genius
Posts: 1311
Joined: August 8th, 2007, 8:10 am
Title: Legendary Genius²
Location: St. George Utah

Re: Changing String

Post by JJ2197 »

I know there is no harm... but you didn't really need to do the work :lol:
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate