C
corky_guy
Hi - me again.
I need to break up the components an inputted value into their
individual numbers and then place them in other spots in the
document. I'm assuming that I need to use the 'split' and 'join'
commands, but I haven't been able to get them work (especially with
the "/", ".", and ":" in the same line!)
Essentially, users will enter data in the following format:
s2/0/0.1/3/7/1:0
I need to take the individual components of the string:
2/0/0
3
7
1
0
and put them back together and arrange them in a format similar to
this:
controller SONET 2/0/0
!
tug-1 3
7 ch 1
channel-group 0
So, I need to create an array, split the string, and then rejoin the
string? Am I on the right track? Can someone help with the code?
Thanks everyone.
I need to break up the components an inputted value into their
individual numbers and then place them in other spots in the
document. I'm assuming that I need to use the 'split' and 'join'
commands, but I haven't been able to get them work (especially with
the "/", ".", and ":" in the same line!)
Essentially, users will enter data in the following format:
s2/0/0.1/3/7/1:0
I need to take the individual components of the string:
2/0/0
3
7
1
0
and put them back together and arrange them in a format similar to
this:
controller SONET 2/0/0
!
tug-1 3
7 ch 1
channel-group 0
So, I need to create an array, split the string, and then rejoin the
string? Am I on the right track? Can someone help with the code?
Thanks everyone.