Prado\Util\TSimpleDateFormatter::getInteger PHP Метод

getInteger() приватный Метод

Gets integer from part of a string, allows integers of any length.
private getInteger ( $str, $i, $minlength, $maxlength ) : string
Результат string integer portion of the string, null otherwise
    private function getInteger($str, $i, $minlength, $maxlength)
    {
        //match for digits backwards
        for ($x = $maxlength; $x >= $minlength; $x--) {
            $token = $this->substring($str, $i, $x);
            if ($this->length($token) < $minlength) {
                return null;
            }
            if (preg_match('/^\\d+$/', $token)) {
                return $token;
            }
        }
        return null;
    }