Automattic\WooCommerce\Vendor\Sabberworm\CSS\Parsing

ParserState::substrprivateWC 1.0

Method of the class: ParserState{}

No Hooks.

Returns

String.

Usage

// private - for code of main (parent) class only
$result = $this->substr( $iStart, $iLength );
$iStart(int) (required)
.
$iLength(int) (required)
.

ParserState::substr() code WC 10.5.0

private function substr($iStart, $iLength)
{
    if ($iLength < 0) {
        $iLength = $this->iLength - $iStart + $iLength;
    }
    if ($iStart + $iLength > $this->iLength) {
        $iLength = $this->iLength - $iStart;
    }
    $sResult = '';
    while ($iLength > 0) {
        $sResult .= $this->aText[$iStart];
        $iStart++;
        $iLength--;
    }
    return $sResult;
}