Working with Strings

BlitzPlus Forums/BlitzPlus Beginners Area/Working with Strings

I'm trying to create a hang-man like game. What I need is some command that will tell the computer whether a particular letter is in a certain string. That way, I can tell the user whether their guess was right or wrong.

I would appreciate any help.

text$="abcdefghijklmnopqrstuvwxyz"
find$="o"
location=instr(text$,find$)

------

Now: location contains the position, if found. If not found it's 0.

Thanks a lot. That's exactly what I needed to know.

Yeah, I've been wanting to do that for awhile.