Single Line Fields: finding a string in another (comma separted) string

Single Line Fields: finding a string in another (comma separted) string

I have a single line field that is hidden from public view.  It contains a string which is a comma-separated list.  I want to check if a given string from another field is in that string (the comma separated list) .  How do I do this?



test_data  =  Form[RecordID == input.RecordID]; //get the record to do this operation
temp_string = testdata.String_Field; //gets the value of the string I am looking for
temp_comma_list = testdata.Comma_Separated_String_Field;  //gets the comma seperated list

so suppoose:
temp_string="def"
temp_comma_list="abc,def,ghi,jkl"

// now I want to find temp_string in temp_comma_list, if it is there then I do something... here it is