I need help in finding a word in a string
I need to search for exact work in the string;
testfld = "FIND THE STRING IN THIS SENTENCE";
testfld1 = "FIND THESTRING IN THIS SENTENCE";
testfld2 = "FIND STRING IN THIS SENTENCE THE";
for ex the output for above should be - searching for "THE"
for testfld it will be yes
for testfld1 it will be false
for testfld2 it will be yes
strstr will match "THE" in the second string also...i need something which matches exact word in the string (word can be at the start, at the end or anywhere else), but it should match exact word...
could someone please give me a sample program?