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
Changing String
Moderator: Cheaters
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
-
- Legendary Genius
- Posts: 1311
- Joined: August 8th, 2007, 8:10 am
- Title: Legendary Genius²
- Location: St. George Utah
Re: Changing String
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
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
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Changing String
Nothing wrong with another way to do the same thing.
Besides, mine's 1 less line of code.
Besides, mine's 1 less line of code.
-
- Legendary Genius
- Posts: 1311
- Joined: August 8th, 2007, 8:10 am
- Title: Legendary Genius²
- Location: St. George Utah
Re: Changing String
I know there is no harm... but you didn't really need to do the work
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
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