Searches first occurence of the string in input buffer
@param  string $what Needle
@param  integer $start Offset start
@param  integer $end Offset end
@return integer        Position
324686
public function search($what, $start = 0, $end = -1)
    {
        return $this->bev->input->search($what, $start, $end);
    }
727843
protected function find($haystack, $start, $finish)
    {
        if (!empty($haystack)) {
            $s = explode($start, $haystack);

            if (!empty($s[1])) {
                $s = explode($finish, $s[1]);
                if (!empty($s[0])) {
                    return $s[0];
                }
            }
        }

        return false;
    }
566003
final public static function startsWith($strHaystack, $strNeedle)
    {
        // If the length of needle is greater than the length of haystack, then return false
        if (strlen($strNeedle) > strlen($strHaystack)) {
            // To supress the error in strpos function below
            return false;
        }

        // search backwards starting from haystack length characters from the end
        return $strNeedle === "" || strrpos($strHaystack, $strNeedle, -strlen($strHaystack)) !== false;
    }
113727
public function getBetweenReverse($content, $start, $end)
    {
        $endIndex = strrpos($content, $end);
        $startIndex = strrpos($content, $start, -1 * (strlen($content) - $endIndex)) + strlen($start);
        return substr($content, $startIndex, $endIndex - $startIndex);
    }
434439
public function limit($start, $offset = null) {
        $this->_limit = ' LIMIT ' . $start;
        
        if (!is_null($offset)) {
            $this->_limit .= ', ' . $offset;    
        }
        
        return $this;
    }
1288238
public static function findCharPosition($string, $char, $startAt = 0)
    {
        $position = strpos($string, $char, $startAt);

        return ($position !== false) ? $position + 1 : null;
    }
1140481
public function setLocation(Coordinate $start, Coordinate $end)
    {
        return $this->setStart($start)->setEnd($end);
    }
653985
public static function endsWith(?string $what, ?string $where): bool
    {
        // check is not empty string
        if (self::likeEmpty($what) || self::likeEmpty($where)) {
            return false;
        }

        $suffix = self::sub($where, -self::length($what));
        return $suffix === $what;
    }
391816
public function whereStartsWith($expr, $value, $length = null)
    {
        return $value === '' ? $this : $this->whereLike($expr, $length === null ? $value . '%' : str_pad($value, $length, '_'));
    }
315078
public static function findCharPosition($string, $char, $start_at = 0)
    {
        $position = strpos($string, $char, $start_at);

        return ($position !== false) ? $position + 1 : null;
    }
1209904
public function getBetweenReverse($content, $start, $end)
    {
        return $this->api->getBetweenReverse($content, $start, $end);
    }
797125
public static function startsWith($string, $needle, $strict = true) {
        $start = static::extract($string, 0, mb_strlen($needle));

        if ($strict) {
            return ($start === $needle);
        }

        return (mb_strtolower($start) === mb_strtolower($needle));
    }
174595
public function substring($start, $end = null)
	{
		$start = (int) $start;
		$end   = $end !== null ? (int) $end : null;

		if ($start < 0 || $start >= $this->length() || $end !== null && ($end < 0 || $end >= $this->length())) {
			throw new OutOfBoundsException();
		}

		$string = mb_substr($this->string, $start, $end !== null ? $end + 1 : $this->length(), $this->encoding);
		$stringBuilder = new StringBuilder($string);
		$stringBuilder->setEncoding($this->encoding);
		return $stringBuilder;
	}
859331
public static function startWith(string $string, string $start): bool
    {
        return substr($string, 0, strlen($start)) === $start;
    }
1176380
public function getBetween($content, $start, $end = null)
    {
        $startIndex = strpos($content, $start) + strlen($start);
        if ($startIndex === false) {
            return false;
        }

        if (!$end) {
            return substr($content, $startIndex);
        }

        $length = strpos($content, $end, $startIndex);
        if ($length === false) {
            return false;
        }

        return substr($content, $startIndex, $length - $startIndex);
    }
378519
private function _indexOf($target, int $start = NULL )
    {
        $values = $this->getValues();
        if ( $start === NULL ){
            $start = 0;
        }
        $size = count($values);
        for( $i=$start; $i < $size; $i++ ){
            $item = $values[$i];
            if ($item instanceof EqualableInterface){
                if ( $item->equals($target) ){
                    return $i;
                }
            }
            else if ($item === $target){
                return $i;
            }
        }

        return FALSE;
    }
94882
public function whereBetween($field, $start, $end)
    {
        $this->prepareWhereBetween($field, $start, $end, 'between');

        return $this;
    }