Implemented `contains_substring`.