z3ugma
01/07/2023, 5:42 PMif "foo" in "foobar":
print("String was contained")
Ruby:
if my_string.include? "foo"
Is there a way to check to see if a string contains a substring?kasperl
01/07/2023, 5:44 PMz3ugma
01/07/2023, 5:45 PMkasperl
01/07/2023, 5:48 PMkasperl
01/07/2023, 5:48 PMz3ugma
01/07/2023, 6:01 PMkasperl
01/07/2023, 6:49 PMerikcorry
01/08/2023, 8:56 PMindex := haystack.index_of needle
// If it's not there, then index is -1: