
-----------------------------------
Leefhead
Sat Nov 29, 2008 3:37 am

breaking a string down into characters
-----------------------------------
its been about 3 years since i was in highschool and used turing at all, so needless to say, i dont remember a whole lot of it. my girlfriend is having problems with a word game, so i decided i would make a program to pretty much make her annihilate the score board, lol.  anyways, im inputting a text file with a list of words into a flexible array, and im getting a list of characters inputted by the user, put that into a array.  only part i dont remember how to do is break down the words that i got out of the text files down into characters so i can compare the characters in the words with the characters that were typed in to make sure that their equal.  for example....list of words


aa
aah
aahed
aahing
aahs
aal
aalii
aaliis
aals
aardvark
aardwolf
aargh
aarrgh
aarrghh
aas
aasvogel
ab
aba
abaca
abacas
abaci


ect....(yes i know that a lot of those arent words...im going to work on that after), say the user typed in 


a
b
c
d
e
f
g


i want it to compare the list of words with the characters, so ...


aa = false (only one a)
aah = false (only one a)
aahed= false (only one a)
aahing= false (only one a)
aahs= false (only one a)
aal= false (only one a)
aalii= false (only one a)
aaliis= false (only one a)
aals= false (only one a)
aardvark= false (only one a)
aardwolf= false (only one a)
aargh= false (only one a)
aarrgh= false (only one a)
aarrghh= false (only one a)
aas= false (only one a)
aasvogel= false (only one a)
ab = true (one a, one b)
aba = false (only one a)
abdc = true
abcds = false (no s) 
abaci = false (only one a)


so...theres my question...lets see if anyone understands what im saying, and might even have an answer for me, haha.  Thanks.

Mod Edit: Just making your post easier to read with code tags

-----------------------------------
Insectoid
Sat Nov 29, 2008 8:52 am

RE:breaking a string down into characters
-----------------------------------
(index). For example, 

var apple := "apple"
put apple (3)

This will return the third letter of 'apple', 'p'.

-----------------------------------
Leefhead
Sat Nov 29, 2008 12:15 pm

RE:breaking a string down into characters
-----------------------------------
ah yes, thanks for jaring my memory.
