eastern-flames/eastern flames/scripts/string_contains/string_contains.gml

13 lines
305 B
Plaintext
Raw Permalink Normal View History

2022-08-07 21:14:04 +00:00
function string_contains(str,contains){
for(var i = 1; i <= string_length(str)+1; i++){
for(var j = 1; j <= string_length(contains)+1;j++){
if(string_char_at(str,i+j-1) != string_char_at(contains,j)){
break;
}
if(j == string_length(contains)){
return true;
}
}
}
return false;
}