Hi Spike!
You need to make use of the MID$, LEFT$ and RIGHT$ commands!
MID$ returns a single character from a specified point within the string, LEFT$ and RIGHT$ grab either the left-hand or right-hand side of a string.
So, for example, if I had a string called TEMP$ and it contained "CUMQUAT" I could use this sort of code:
TEMP$ = "CUMQUAT"
PRINT MID$(TEMP$, 4) `This would return a Q
PRINT LEFT$(TEMP$, 2) `This would return CU
PRINT RIGHT$(TEMP$, 4) `This would return QUAT
You can also combine it with FOR\NEXT loops to pull at specific areas of a string dynamically. For example:
Temp$ = "Hello my name is -CumQuaT- and I am a DBpro coder!"
`I have put markers around CumQuaT so that my program can spot it.
FOR C = 1 TO LEN(Temp$) `The LEN command returns the length
`of the string.
IF MID$(Temp$, C) = "-"
Temp$ = RIGHT$(Temp$, (LEN(Temp$) - (C + 1)))
FOR V = 1 TO LEN(Temp$)
IF MID$(Temp$, V) = "-" THEN Temp$ = LEFT$(Temp$, (C-1))
EXIT
NEXT
ENDIF
NEXT
PRINT Temp$ `It will return just the text inside the "-"'s
I hope this was illuminating!
Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame