: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* The class provides utility functions related to String.
* @author Advanced Ads <info@wpadvancedads.com>
namespace AdvancedAds\Utilities;
defined( 'ABSPATH' ) || exit;
* Determine if a string contains a given substring
* @param string $needle The substring to search for in the haystack.
* @param string $haystack The string to search in.
public static function str_contains( $needle, $haystack ): bool {
return false !== strpos( $haystack, $needle );