Check for two strings

Is this possible to check for two strings.
i want to check whether these two params exits i want to proceed the
process
i get two strings through form
search_string_1 = params[:first_name]
search _string_2 = params[:second_name]
if folder_name.include?(search_string_1)(search_string_2)

end

Any helps pls

i have tried your code.
but it gives me argument error

[search_string_1,search_string_2].all? {|s| sub_folder_name.include? s}

pls help me
Thanks

2009/1/29 Newb N. [email protected]:

Is this possible to check for two strings.
i want to check whether these two params exits i want to proceed the
process
i get two strings through form
search_string_1 = params[:first_name]
search _string_2 = params[:second_name]
if folder_name.include?(search_string_1)(search_string_2)

What kind of test do you want? Do you want both or at least one of them?

[search_string_1,search_string_2].all? {|s| folder_name.include? s}
[search_string_1,search_string_2].any? {|s| folder_name.include? s}

Cheers

robert