eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler::getModuloCharRange PHP Method

getModuloCharRange() protected method

Returns a string containing all UTF-8 characters starting with the specified $start character up to the $end character with the step size defined in $modulo.
protected getModuloCharRange ( string $start, string $end, string $modulo ) : string
$start string
$end string
$modulo string
return string
    protected function getModuloCharRange($start, $end, $modulo)
    {
        $start = $this->converter->toUnicodeCodepoint($start);
        $end = $this->converter->toUnicodeCodepoint($end);
        $modulo = hexdec($modulo);
        $chars = '';
        for ($start; $start <= $end; $start += $modulo) {
            $chars .= $this->converter->toUTF8Character($start);
        }
        return $chars;
    }