Page 1 of 1

Word$() Command?

Posted: Tue Apr 22, 2008 2:37 pm
by shadow382
I've been writing a program in another BASIC language, but have decided to switch to PureBasic. In the other language, there is a "word$()" command. I use it to extract specified text from a string.

Ex:

Code: Select all

string$ = "width=640"
n$ = Trim$(Word$(string$, 2, "="))
This would give me the text that comes after "=" in the string. My question is, what is the equivalent of this command in PureBasic? I've looked through the help file, but with no luck. I'm not sure what it would be called in PureBasic.

Thanks, in advance, for your help!

Posted: Tue Apr 22, 2008 2:38 pm
by srod
StringField() should give you what you need.

Posted: Tue Apr 22, 2008 2:40 pm
by shadow382
I feel stupid now. I saw that when I was searching, but just skimmed right over it. Anyway, it is what I need and thanks for your help!

Posted: Tue Apr 22, 2008 2:51 pm
by srod
shadow382 wrote:I feel stupid now......
Don't worry about that, you have a long way to go yet before your level of stupidity could possibly match mine! :wink: