Performs a case insensitive search for the needle
@param string $needle
@return int
340636
public function count(string $needle) : int
    {
        return substr_count(strtolower($this->getText()), strtolower($needle));
    }
33654
public function stripos(string $needle, int $offset = 0)
    {
        $needle = $this->inputConv($needle);
        $pos = \stripos($this->str, $needle, $offset << 2);

        return \is_bool($pos) ? $pos : $pos >> 2;
    }
554176
public function ends_with ($needle)
	{
		ensure('Argument', $needle, 'is_a_string', __CLASS__, __METHOD__);

		if ($needle instanceof self) {
			$needle = $needle->to_s();
		}

		$len = strlen($needle);

		return 0 === strcmp($this->slice(-$len, $len)->to_s(), $needle);
	}
615218
public static function SEARCHINSENSITIVE($needle, $haystack, $offset = 1)
    {
        $needle   = PHPExcel_Calculation_Functions::flattenSingleValue($needle);
        $haystack = PHPExcel_Calculation_Functions::flattenSingleValue($haystack);
        $offset   = PHPExcel_Calculation_Functions::flattenSingleValue($offset);

        if (!is_bool($needle)) {
            if (is_bool($haystack)) {
                $haystack = ($haystack) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
            }

            if (($offset > 0) && (PHPExcel_Shared_String::CountCharacters($haystack) > $offset)) {
                if (PHPExcel_Shared_String::CountCharacters($needle) == 0) {
                    return $offset;
                }
                if (function_exists('mb_stripos')) {
                    $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8');
                } else {
                    $pos = stripos($haystack, $needle, --$offset);
                }
                if ($pos !== false) {
                    return ++$pos;
                }
            }
        }
        return PHPExcel_Calculation_Functions::VALUE();
    }
30114
public static function indexOf($string, $needle, $strict = true, $offset = 0) {
        if ($strict) {
            return mb_strpos($string, $needle, $offset);
        }

        return mb_stripos($string, $needle, $offset);
    }
1019286
public static function contains($haystack, $needle, $ignoreCase = false)
    {
        if ($ignoreCase) {
            return stripos($haystack, $needle) !== false;
        } else {
            return strpos($haystack, $needle) !== false;
        }

    }
1264102
public static function endsWith(
        string $haystack,
        string $needle,
        bool $caseSensitive = false
    ): bool
    {
        $test = substr($haystack, -strlen($needle));
        return ($caseSensitive === false)
            ? strcasecmp($test, $needle) === 0
            : strcmp($test, $needle) === 0;
    }
1128123
public static function contains($val, $needle): bool
    {
        if (!$val || !\is_string($val)) {
            return false;
        }

        if (\is_string($needle) || \is_int($needle)) {
            return \stripos($val, (string)$needle) !== false;
        }

        if (\is_array($needle)) {
            foreach ((array)$needle as $item) {
                if (\stripos($val, $item) !== false) {
                    return true;
                }
            }
        }

        return false;
    }
1219244
public function search($needle)
    {
        $aIterator = new \RecursiveArrayIterator($this);
        $iterator = new \RecursiveIteratorIterator($aIterator);

        while ($iterator->valid()) {
            $iterator->current();

            if ($iterator->current() === $needle) {
                return $aIterator->key();
            }

            $iterator->next();
        }

        return false;
    }
828865
public function containsFilter($haystack, $needle)
    {
        if (empty($needle)) {
            return $haystack;
        }

        return (strpos($haystack, (string) $needle) !== false);
    }
717873
public static function end_with($string, $needle, $case_sensitive = true)
    {
        if(!is_string($string))
        {
            $string = (string)$string;
        }
        
        if(!is_string($needle))
        {
            $needle = (string)$needle;
        }
        
        if($case_sensitive)
        {
            return strrpos($string, $needle) === strlen($string) - strlen($needle);
        }
        else
        {
            return strripos($string, $needle) === strlen($string) - strlen($needle);
        }
    }
160698
public function contains($needle, $flags = 0)
    {
        return ($flags & self::CASE_SENSITIVE) ? (strpos($this->getInternalValue(),
                $needle) !== false) : (stripos($this->getInternalValue(), $needle) !== false);
    }
117881
protected function searchEncoder($needle) {
    if (is_array($needle)) {
      foreach ($needle as $n) {
        $result = $this->searchEncoder($n);
        if ($result) {
          return $result;
        }
      }
      return false;
    }

    $encoders = $this->getEncoders();
    foreach ($encoders as $encoder) {
      if (strpos($encoder, $needle) !== false) {
        return $encoder;
      }
    }
    return false;
  }
259617
public static function endsWith($haystack, $needle, $caseSensitive = true)
    {
        $haystackLength = strlen($haystack);
        $needleLength = strlen($needle);
        if ($haystackLength < $needleLength) {
            return false;
        }

        $haystack = substr($haystack, -$needleLength);
        if (!$caseSensitive) {
            $haystack = strtolower($haystack);
            $needle = strtolower($needle);
        }
        return $haystack == $needle;
    }
947384
public static function contains($haystack, $needle, $caseSensitive = true)
    {
        return ($caseSensitive ? strpos($haystack, $needle) : stripos($haystack, $needle)) !== false;
    }
838909
function(needle) {
        if (arr.indexOf) {
          return arr.indexOf(needle);
        } else {
          for (var i=0, length=arr.length; i<length; i++) {
            if (arr[i] === needle) { return i; }
          }
          return -1;
        }
    }
644279
public static function endsWith($haystack, $needle)
    {
        $length = strlen($needle);
        if ($length == 0) {
            throw new \Exception("Needle must be one or more characters");
        }

        return (substr($haystack, -$length) === $needle);
    }