
-----------------------------------
Dragoooon
Sun Mar 23, 2003 5:56 pm

What is the index command?
-----------------------------------
What does the index command do?

-----------------------------------
Tony
Sun Mar 23, 2003 6:45 pm


-----------------------------------
it is used to see if a string in contrained withing another string and if so, returns the position where it starts.


put index("compsci", "sci")

outputs 5 since "sci" starts on 5th character of "compsci"

it also works the other way:

if index("1234567890", "1") not=0 then
put "its a digit"
else
put "its not a digit"
end if


-----------------------------------
Dragoooon
Sun Mar 23, 2003 6:55 pm

thx
-----------------------------------
thank you :)

-----------------------------------
al.ba
Wed Nov 22, 2017 8:54 pm

RE:What is the index command?
-----------------------------------
Hi, I'm finding difficulties with a turing programming exercises on string manipulation it asks me to gather a word from the user and display it with every vowel exchanged with 9

-----------------------------------
kohul
Wed Apr 04, 2018 8:55 pm

Re: RE:What is the index command?
-----------------------------------
Hi, I'm finding difficulties with a turing programming exercises on string manipulation it asks me to gather a word from the user and display it with every vowel exchanged with 9

Mod edit: deleted answer. OP came here to learn, not to cheat.

that should be it.
