|
-
Jun 7th, 2003, 03:13 PM
#1
Thread Starter
Fanatic Member
Arrays
Suppose i have an array a:
a[n] = n + b * c, i - p
or simply
a[n] = g, h
how can i make it
a[n] = h.
In other words, how do I take out the g and the ",". ?
And after take out g and the ",", suppose h = " hi", how do you take out the extra spaces before the hi.
Thank you.

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Jun 8th, 2003, 03:08 PM
#2
Lively Member
Code:
var b = a[n].split(',');
if (b.length > 0) {
var c = b[1];
while (c.indexOf(' ') == 0) {
c = c.substr(1, c.length - 1);
}
a[n] = c;
}
- Steve
"I'm glad I wore these pants."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|