トピック
noone 4113TA

String - letters help wanted

Now, say I have XDF in one string. Now I add PDF to it. Simple, right? But then the question begs: if i want to remove DF from PDF, without typing it already(making a preset string that already says XDFP), how will I do this. Thanks in advance
1そうだね
プレイ済み
返信[1]
親投稿
Oscar PwnageBlock
You can use the LEFT$ function to return a string with a specified amount of characters from the left of another specified string. That means you can do something like A$="XDF" 'START WITH XDF INC A$,"PDF" 'CONCATENATE PDF A$=LEFT$(A$,LEN(A$)-2) 'EXTRACTS A STRING FROM A$ THAT'S THE LENGTH OF A$ MINUS 2 (REMOVES LAST 2 LETTERS)
1そうだね
プレイ済み
返信[2]
親投稿
Oscar PwnageBlock
There's also the RIGHT$ function, which does the same thing but extracts the string starting from the right. There's also MID$, which begins extracting from a specified start position.
1そうだね
プレイ済み
返信[3]
親投稿
noone 4113TA
Dang... Thank you!
0そうだね
プレイ済み