Use str/substr instead of haystack/needle