截断内容
@param $start
@param null $end
@return bool|string
760799
public function substring($start, $end = null)
    {
        if ($end === null) {
            return substr($this->content, $start);
        }
        $len = $end - $start;
        if ($len < 0) {
            return '';
        }
        return substr($this->content, $start, $len);
    }
551163
public function getPageRange($start, $end)
	{
		$pages = array();

		for ($page = $start; $page <= $end; $page++)
		{
			// If the current page is equal to the page we're iterating on, we will create a
			// disabled link for that page. Otherwise, we can create a typical active one
			// for the link. We will use this implementing class's methods to get HTML.
			if ($this->currentPage == $page)
			{
				$pages[] = $this->getActivePageWrapper($page);
			}
			else
			{
				$pages[] = $this->getLink($page);
			}
		}

		return implode('', $pages);
	}
1316488
public function getUrlRange($start, $end)
    {
        return collect(range($start, $end))->mapWithKeys(function ($page) {
            return [$page => $this->url($page)];
        })->all();
    }
151424
public function save($start = null, $end = null)
    {
        $url = $this->_baseURL . "/saveas";
        if (!empty($start)) {
            $params['start'] = $start;
        }
        if (!empty($end)) {
            $params['end'] = $end;
        }
        $body = json_encode($params);
        return $this->_transport->send(HttpRequest::POST, $url, $body);
    }
400602
public function removeRange(int $start, int $end): bool {
        $removed = true;
        foreach ($this->array as $key => $item) {
            if ($key >= $start && $key <= $end) {
                $removed &= $this->remove($key);
            }
        }
        $this->array = \array_values($this->array);
        return $removed;
    }
758458
public function substr($key, $start, $end) {
        return $this->returnCommand(['SUBSTR'], $key, [$key, $start, $end]);
    }
961935
static function get_string_between($string, $start, $end){
        try {
            $string = " ".$string;
            $ini = strpos($string,$start);
            if ($ini == 0) return "Start non trouve";
            $ini += strlen($start);
            $len = strpos($string,$end,$ini) - $ini;
            return substr($string,$ini,$len);
        } catch (Exception $e) {
            $msg = $e->getMessage();
            Throw new \Exception('Erreur dans '.__CLASS__.' : '.$msg);
            return null;
        }
    }
260837
public function create($start = NULL, Array $settings = []) : String
    {
        # The configuration arrays are merge.
        $settings = array_merge($this->config, $this->settings, $settings);

        # If the configuration is present, it is rearranged.
        if( ! empty($settings) )
        {
            $this->settings($settings);
        }

        # Gets information about which recording to start the paging process.
        $startRowNumber = $this->getStartRowNumber($start);

        # If the limit is set to 0, 1 is accepted.
        $this->limit = $this->limit === 0 ? 1 : $this->limit;
        
        # Generate pagination bar.
        if( $this->isPaginationBar() )
        {
            return $this->isBasicPaginationBar() ? $this->createBasicPaginationBar($startRowNumber) : $this->createAdvancedPaginationBar($startRowNumber);
        }

        return false;
    }
631182
public function historyActivity($start = null, $end = null)
    {
        $url = $this->_baseURL . "/historyrecord";
        $flag = "?";
        if (!empty($start)) {
            $url = $url . $flag . "start=" . $start;
            $flag = "&";
        }
        if (!empty($end)) {
            $url = $url . $flag . "end=" . $end;
        }
        return $this->_transport->send(HttpRequest::GET, $url);
    }
599773
public static function getDateTimeRange($start, $end = null, $exact = false)
    {
        return [
            static::buildDateTime($start, !$exact),
            static::buildDateTime($end ?: $start, false, !$exact),
        ];
    }
154180
private function readStreamTill($ending)
    {
        $buffer = '';
        $len = strlen($ending);
        do {
            $char = fread($this->stream, 1);
            $buffer .= $char;
        } while ($char && substr($buffer, $len * -1) != $ending && !feof($this->stream));
        return $buffer;
    }
231445
public function usage($start = false, $end = false, $period = null)
    {
        $params = array();

        if ($start) {
            $params['start'] = $start;
        }
        if ($end) {
            $params['end'] = $end;
        }
        if (isset($period)) {
            $params['period'] = $period;
        }

        return $this->_user->get('account/usage', $params);
    }
689672
public function getAdverts($start, $end, $section=null)
    {
    
        if($count == 0){
            $count2 = 0;

            $qb2 = $this->getQueryBuilder() 
            ->join('a.located', 'l')
            ->where('l.name = :section')
            ->andWhere('a.from <= :start')
            ->andWhere('a.to >= :end')
            ->andWhere('a.active = :active')
            ->setParameters(array(
                'section' => $section, 
                'start' => $start, 
                'end' => $end,
                'active' => true,
                ));

            $query = $qb2->getQuery();
        }
        
        //->orderBy('s.day', 'ASC')
        $adverts = array();
        if(is_object($query)){
            $adverts = $query->getResult();
        }
        
        $arr = new \Doctrine\Common\Collections\ArrayCollection();
        foreach ($adverts as $ad) {
            $arr->add($ad);
        }
        
        return $arr;
    }
1209904
public function getBetweenReverse($content, $start, $end)
    {
        return $this->api->getBetweenReverse($content, $start, $end);
    }
324686
public function search($what, $start = 0, $end = -1)
    {
        return $this->bev->input->search($what, $start, $end);
    }
234521
public function createdAt($start = null, $end = null)
    {
        /* @var $this ActiveQuery */
        $model = $this->noInitModel;
        if (!is_string($model->createdAtAttribute) || empty($model->createdAtAttribute)) {
            return $this;
        }
        return static::range($this, $model->createdAtAttribute, $start, $end);
    }
702759
public function readLinesBetween(int $start, int $end) : array
    {
        $content = file($this->_path);
        $lines   = [];

        for($i = $start; $i < $end; $i++) {
            if(isset($content[$i])) {
                $lines[] = $content[$i];
            }
        }

        return $lines;
    }