字符串长度过滤截取
@param  string  $string 字符串
@param  integer $start 起始长度
@param  int     $end 结束位置
@return string
336257
public static function stringCute($string, $start = 0, $end = null): string
    {
        if (!\is_string($string)) {
            return '';
        }

        // $length    = Helper::strlen($string);
        return self::subStr($string, $start, $end);
    }
624383
public static function cut(string $text, int $start = 0, int $end = 0)
    {
        return Str::sub($text, $start, $end);
    }
64224
public function substring($start, $end = null) {
		$length = $this->length();
		if ($end < 0) {
			$end = $length + $end;
		}
		$end = $end !== null ? min($end, $length) : $length;
		$start = min($start, $end);
		$end = max($start, $end);
		$end = $end - $start;

		return new Text(mb_substr($this->string, $start, $end, $this->encoding), $this->encoding);
	}
601437
public function getBetween($content, $start, $end = null)
    {
        return $this->api->getBetween($content, $start, $end);
    }
1009690
public static function between(
        $string,
        $start,
        $end,
        $offset = 0,
        $encoding = null
    ) {
        $encoding = $encoding === null ? mb_internal_encoding() : $encoding;

        $startIndex = Mbstring::strpos($string, $start, $offset, $encoding);

        if ($startIndex === false) {
            return '';
        }

        $substrIndex = $startIndex + Mbstring::strlen($start, $encoding);

        $endIndex = Mbstring::strpos($string, $end, $substrIndex, $encoding);

        if ($endIndex === false) {
            return '';
        }

        return Mbstring::substr($string, $substrIndex, $endIndex - $substrIndex);
    }
383122
public String mkString(String start, String sep, String end) {
		StringBuilder ret = new StringBuilder(start);
		for (int i = 0; i < inner.size(); i++) {
			ret.append(inner.get(i));
			if (i != (inner.size() - 1)) {
				ret.append(sep);
			}
		}
		return ret.append(end).toString();
	}
1057795
public static function join($strings, $separator, $start = 0, $count = -1)
    {
        $string = '';

        $end = $count == -1 ? Collection::count($strings) : $count;

        for ($i = $start; $i < $end; $i++) {
            $string .= $strings[$i].$separator;

            if ($i == ($end - 1)) {
                $string .= $separator;
            }
        }

        return $string;
    }
708086
public static function slice($string, $start, $end = null, $encoding = null)
    {
        $encoding = $encoding === null ? mb_internal_encoding() : $encoding;

        if ($end === null) {
            $length = Mbstring::strlen($string, $encoding);
        } elseif ($end >= 0 && $end <= $start) {
            return '';
        } elseif ($end < 0) {
            $length = Mbstring::strlen($string, $encoding) + $end - $start;
        } else {
            $length = $end - $start;
        }

        return Mbstring::substr($string, $start, $length, $encoding);
    }
33121
public static function Substring ($string, $start, $length = null, $encoding = Encoding::DEFAULT_ENCODING) {
		if ($length === null) {
			$length = self::Length($string) - $start;
		}
		return mb_substr($string, $start, $length, $encoding);
	}
472473
public static function changeStatus($start, $end)
	{
		if ( empty($start) || ! is_string($start)) {
			throw new WorkflowException('$start must be a string');
		}

		if ( empty($end) || ! is_string($end)) {
			throw new WorkflowException('$end must be a string');
		}

		return 'from {'.$start.'} to {'.$end.'}';
	}
514093
public static function endsWith($string, $ending)
    {
        if (1 === strlen($ending) && !self::isLetterOrDigit($ending)) {
            $ending = '\\' . $ending;
        }

        return (bool)preg_match('|' . $ending . '$|', $string);
    }
301501
public static function substr_replace($string, $replacement, $start , $length=null )
    {
        $ret = '';
        if($start>0) $ret .= self::substr($string, 0, $start);
        $ret .= $replacement;
        if($length!=null) $ret .= self::substr($string, $start+$length);
        return $ret;
    }
1316488
public function getUrlRange($start, $end)
    {
        return collect(range($start, $end))->mapWithKeys(function ($page) {
            return [$page => $this->url($page)];
        })->all();
    }
1140281
public static function startsWith($string, $prefix)
    {
        $string = is_int($string) ? "$string" : $string;
        $prefix = is_int($prefix) ? "$prefix" : $prefix;
        return is_string($string) && is_string($prefix) && mb_substr($string, 0, mb_strlen($prefix)) === $prefix;
    }
208239
public function substring(int $begin, int $end = null): self
    {
        return $this->substr($begin, $end ? $end - $begin + 1 : null);
    }
1215367
public static function abjad($start=0,$end=0){
		$abjadList = [];		
		for($i=65;$i<=90;$i++){
			$abjadList[]=chr($i);
			if($i==90){
				for($j=65;$j<=90;$j++){
					for($k=65;$k<=90;$k++){
						$abjadList[]=chr($j).chr($k);
					}
				}
			}
		}
		
		$abjad = [];
		if($end<$start) $end=$start;
		for($x=$start;$x<=$end;$x++){
			if($x>=702) break;
			$abjad[$x] = $abjadList[$x];
		}
		return $abjad;
	}
374534
public static function getRangeTime( $start, $end, $dec = 6 )
	{
		if( !isset( self::$info[$end] ) ){
			self::$info[$end] = microtime( true );
		}
		return number_format( (self::$info[$end] - self::$info[$start]), $dec );
	}