@param string $ext
@param boolean $start

@return string
18037
private function getInjectionPlaceholder($ext, $start = true)
    {
        if ($start && $this->options['starttag']) {
            return sprintf(
                '(%s)',
                preg_quote($this->options['starttag'])
            );
        }

        if (! $start && $this->options['endtag']) {
            return sprintf(
                '(%s)',
                preg_quote($this->options['endtag'])
            );
        }

        $tagname = $this->options['tagname'];
        $name = $start ? $tagname : 'end' . $tagname;

        $tag = $this->tags[$ext];
        $tag = preg_replace('/{{name}}/', $name, $tag);
        $tag = $start ? $tag : preg_replace('/:{{ext}}/', null, $tag);

        return $tag;
    }
509444
private function checkExt($ext)
    {
        return empty($this->config['exts']) ? true : in_array(strtolower($ext), $this->exts);
    }
772869
public function ltrim($key, $start, $stop) {
        return $this->returnCommand(['LTRIM'], $key, [$key, $start, $stop]);
    }
40126
public function _generateLine($string, $start=5) {
    if($this->options['trace']['enabled']) {
      $trace = $this->_stackString($this->options['trace']['depth'], $start+$this->options['trace']['offset'], $this->options['separator']);
    } else {
      $trace = "";
    }

    $result = "";

    if($this->options['timestamp']['enabled']) {
      $result .= date('c').' ';
    }

    $result .= implode($this->options['separator'],array_filter(array($trace,$string)));

    if($this->options['banner']['enabled']) {
      $result = $this->_generateBanner($result);
    }

    return $result;
  }
1246789
public function acceptsMime($ext)
    {
        if ($this->getAllowedMimes() && !in_array($ext, $this->getAllowedMimes())) {
            return false;
        }

        if ($this->getRejectedMimes() && in_array($ext, $this->getRejectedMimes())) {
            return false;
        }

        return true;
    }
569318
public function substringBetween($start, $end)
    {
        $ini = mb_stripos($this->str, $start, 0, $this->encoding);

        if ($ini === 0) {
            return "";
        }

        $ini += mb_strlen($start, $this->encoding);
        $len = mb_stripos($this->str, $end, $ini, $this->encoding) - $ini;

        return static::create(mb_substr($this->str, $ini, $len, $this->encoding), $this->encoding);
    }
430215
protected function quote($s, $start, $end)
    {
        if ($start == $end) {
            return "";
        }
        return preg_quote(substr($s, $start, $end), '#');
    }
324686
public function search($what, $start = 0, $end = -1)
    {
        return $this->bev->input->search($what, $start, $end);
    }
929014
public function substring($indexStart, $indexEnd = null)
    {
        if (is_null($indexEnd) === true) {
            $indexEnd = $this->length();
        }

        $temp = [$indexStart, $indexEnd];
        sort($temp);

        return $this->slice($temp[0], $temp[1]);
    }
43285
private function getGroup($start = "WHERE",$table = NULL)
    {
        if(count($this->group))
        {
            $temp = [];
            foreach($this->group as $k=>$v)
                $temp[] = (!empty($table) ? $table."." : '')."`".$k."` = '".$v."'";
            return $start." ".implode(' AND ',$temp);
        }
        else
            return '';
    }
1122996
public function setExtension($ext)
	{
		$this->extension = $ext;

		if(!$this->extensionMap->has($ext))
		{
			throw new Exceptions\InvalidExtension($ext);
		}

		return $this;
	}
800860
public static function genName($ext)
    {
        list($usec, $sec) = explode(" ", microtime());

        $fix = substr($usec, 2, 4);

        return date('YmdHis') . $fix . "." . ltrim($ext, ".");
    }
459280
public function subSequence(int $start, int $end) {
        $arrayList = $this->arrayList->subList($start, $end);
        $stringBuilder = $this->arrayListToStringBuilder($arrayList);
        return $stringBuilder;
    }
1301782
public function source($start = null, $end = null)
    {
        $source = '';
        $start = (int) $start;
        $end = $end === null ? ($this->count() - 1) : (int) $end;
        for ($i = $start; $i <= $end; $i++) {
            $source .= $this->_data[$i][1];
        }
        return $source;
    }
700880
private function buildBasename(string $extension, string $ext, string $param = null): string
    {
        $length = strrpos($ext, '.'.pathinfo($ext, PATHINFO_EXTENSION));
        if (false !== $length) {
            $ext = substr($ext, 0, $length);
        }

        if (null !== $param && '' !== $param) {
            $param = ';'.$param;
        }

        $extension = trim($extension);
        if ('' === $extension) {
            return $ext.$param;
        }

        return $ext.'.'.$extension.$param;
    }
1361565
public function checkExt($ext) {
		if (is_string($ext)) {
			$ext = explode(',', $ext);
		}
		$extension = strtolower(pathinfo($this->getInfo('name'), PATHINFO_EXTENSION));
		if (!in_array($extension, $ext)) {
			return false;
		}
		return true;
	}
1078364
public static function GetMimeTypeByExt ($ext) {
		$ext = strtolower($ext);
		$mime_type_map = static::GetMimeTypeMapForExt();
		return isset($mime_type_map[$ext]) ? $mime_type_map[$ext] : static::MIME_TYPE_BINARY;
	}