***Please pretend that any "-" is actually a white space.***
I have a string DDInfo that has read a line from a text file and it says:
" //SORTLIB DD DSN=SYS1.SORTLI B,DISP=SHR---------------------------0000380"
I remove certain unnescesary information and come up with this:
"DSN=SYS1.SORTL IB,DISP=SHR--------------------------"
all i want to do is trim off the trailing whitespaces but the code i have will not do it.
this is the entirety of what happens to the string:
The remove and first substring work perfectly but the problem is it still reads:
"DSN=SYS1.SORTL IB,DISP=SHR--------------------------"
Substring to remove the end doesn't work either.
I feel like im missing something here. Im using Visual studio 2008.
I have a string DDInfo that has read a line from a text file and it says:
" //SORTLIB DD DSN=SYS1.SORTLI B,DISP=SHR---------------------------0000380"
I remove certain unnescesary information and come up with this:
"DSN=SYS1.SORTL IB,DISP=SHR--------------------------"
all i want to do is trim off the trailing whitespaces but the code i have will not do it.
this is the entirety of what happens to the string:
Code:
DDInfo = sLine.Remove(73); DDInfo = DDInfo.Substring(16); DDInfo.Trim();
"DSN=SYS1.SORTL IB,DISP=SHR--------------------------"
Substring to remove the end doesn't work either.
I feel like im missing something here. Im using Visual studio 2008.
Comment