#Method 1
def strcomp(str1, str2)
str1.split.each do |s1|
str2.split.each do |s2|
return false if s1 != s2
end
end
return true
end
#Method 2
def string_comp str1, str2
return false if str1.length != str2.length
for i in 0...str1.length
return false if str1[i] != str2[i]
end
return true
end