Inflection.php
private function _xDetene($txt2)
    {
        $XdeteneRV = '';
        for ($XdeteneI = 0; $XdeteneI < mb_strlen($txt2, 'UTF-8') - 1; $XdeteneI++) {
            $condition = mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e' || mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'i' || mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'í';
            if ($condition && mb_substr($txt2, $XdeteneI, 1, 'UTF-8') === 'ď') {
                $XdeteneRV .= 'd';
                if (mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e') {
                    $XdeteneRV .= 'ě';
                    $XdeteneI++;
                }
            } else if ($condition && mb_substr($txt2, $XdeteneI, 1, 'UTF-8') === 'ť') {
                $XdeteneRV .= 't';
                if (mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e') {
                    $XdeteneRV .= 'ě';
                    $XdeteneI++;
                }
            } else if ($condition && mb_substr($txt2, $XdeteneI, 1, 'UTF-8') === 'ň') {
                $XdeteneRV .= 'n';
                if (mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e') {
                    $XdeteneRV .= 'ě';
                    $XdeteneI++;
                }
            } else {
                $XdeteneRV .= mb_substr($txt2, $XdeteneI, 1, 'UTF-8');
            }
        }

        if ($XdeteneI === mb_strlen($txt2, 'UTF-8') - 1) {
            $XdeteneRV .= mb_substr($txt2, $XdeteneI, 1, 'UTF-8');
        }

        return $XdeteneRV;
    }
private function _xDetene($txt2)
    {
        $XdeteneRV = '';
        for ($XdeteneI = 0; $XdeteneI < mb_strlen($txt2, 'UTF-8') - 1; $XdeteneI++) {
            $condition = mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e' || mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'i' || mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'í';
            if ($condition && mb_substr($txt2, $XdeteneI, 1, 'UTF-8') === 'ď') {
                $XdeteneRV .= 'd';
                if (mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e') {
                    $XdeteneRV .= 'ě';
                    $XdeteneI++;
                }
            } else if ($condition && mb_substr($txt2, $XdeteneI, 1, 'UTF-8') === 'ť') {
                $XdeteneRV .= 't';
                if (mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e') {
                    $XdeteneRV .= 'ě';
                    $XdeteneI++;
                }
            } else if ($condition && mb_substr($txt2, $XdeteneI, 1, 'UTF-8') === 'ň') {
                $XdeteneRV .= 'n';
                if (mb_substr($txt2, $XdeteneI + 1, 1, 'UTF-8') === 'e') {
                    $XdeteneRV .= 'ě';
                    $XdeteneI++;
                }
            } else {
                $XdeteneRV .= mb_substr($txt2, $XdeteneI, 1, 'UTF-8');
            }
        }

        if ($XdeteneI === mb_strlen($txt2, 'UTF-8') - 1) {
            $XdeteneRV .= mb_substr($txt2, $XdeteneI, 1, 'UTF-8');
        }

        return $XdeteneRV;
    }
private function _xDetene ( $ txt2 ) { $ XdeteneRV = '' ; for ( $ XdeteneI = 0 ; $ XdeteneI < mb_strlen ( $ txt2 , 'UTF-8' ) - 1 ; $ XdeteneI ++ ) { $ condition = mb_substr ( $ txt2 , $ XdeteneI + 1 , 1 , 'UTF-8' ) === 'e' || mb_substr ( $ txt2 , $ XdeteneI + 1 , 1 , 'UTF-8' ) === 'i' || mb_substr ( $ txt2 , $ XdeteneI + 1 , 1 , 'UTF-8' ) === 'í'; if ( $ condition && mb_substr ( $ txt2 , $ XdeteneI , 1 , 'UTF-8' ) === 'ď') $ XdeteneRV .= 'd' ; if ( mb_substr ( $ txt2 , $ XdeteneI + 1 , 1 , 'UTF-8' ) === 'e' ) { $ XdeteneRV .= 'ě'; $ XdeteneI ++ ; } } else if ( $ condition && mb_substr ( $ txt2 , $ XdeteneI , 1 , 'UTF-8' ) === 'ť') $ XdeteneRV .= 't' ; if ( mb_substr ( $ txt2 , $ XdeteneI + 1 , 1 , 'UTF-8' ) === 'e' ) { $ XdeteneRV .= 'ě'; $ XdeteneI ++ ; } } else if ( $ condition && mb_substr ( $ txt2 , $ XdeteneI , 1 , 'UTF-8' ) === 'ň') $ XdeteneRV .= 'n' ; if ( mb_substr ( $ txt2 , $ XdeteneI + 1 , 1 , 'UTF-8' ) === 'e' ) { $ XdeteneRV .= 'ě'; $ XdeteneI ++ ; } } else { $ XdeteneRV .= mb_substr ( $ txt2 , $ XdeteneI , 1 , 'UTF-8' ) ; } } if ( $ XdeteneI === mb_strlen ( $ txt2 , 'UTF-8' ) - 1 ) { $ XdeteneRV .= mb_substr ( $ txt2 , $ XdeteneI , 1 , 'UTF-8' ) ; } return $ XdeteneRV ; }
Transformace: ďi,ťi,ňi,ďe,ťe,ňe ... di,ti,ni,dě,tě,ně + 'ch' -> '#'

@param string $txt2 Vstupni text

@return string Transformovany text
Transformace : ďi ťi ňi ďe ťe ňe ... di ti ni dě tě ně + ch - > #