Strings as arrays?
by Brian Lococo · in Torque Game Engine · 07/21/2004 (9:51 am) · 1 replies
Ok I have a question...
Say I do the following in script
%a = "TestString";
How do i set the first character in that string.
%b = ?
for instance, in c++ i could just say
char a[11] = "TestString";
a[0] = 'B';
I know that you can use the GetSubStr to get individual characters, it would make since
to have a SetSubStr function...
Thx for your help in advance!
Say I do the following in script
%a = "TestString";
How do i set the first character in that string.
%b = ?
for instance, in c++ i could just say
char a[11] = "TestString";
a[0] = 'B';
I know that you can use the GetSubStr to get individual characters, it would make since
to have a SetSubStr function...
Thx for your help in advance!
Torque Owner Nathan Martin
TRON 2001 Network
%a = "B" @ getsubstr(%a, 1);
Now %a == "BestString";
:)
Edited: Woops I was thinking about PHP when using . to add strings together, hehe...