Vendor/langcode-conv/zendframework/zend-stdlib/src/StringWrapper/MbString.php
public function convert($str, $reverse = false)
    {
        $encoding        = $this->getEncoding();
        $convertEncoding = $this->getConvertEncoding();

        if ($convertEncoding === null) {
            throw new Exception\LogicException(
                'No convert encoding defined'
            );
        }

        if ($encoding === $convertEncoding) {
            return $str;
        }

        $fromEncoding = $reverse ? $convertEncoding : $encoding;
        $toEncoding   = $reverse ? $encoding : $convertEncoding;
        return mb_convert_encoding($str, $toEncoding, $fromEncoding);
    }
public function convert($str, $reverse = false)
    {
        $encoding        = $this->getEncoding();
        $convertEncoding = $this->getConvertEncoding();

        if ($convertEncoding === null) {
            throw new Exception\LogicException(
                'No convert encoding defined'
            );
        }

        if ($encoding === $convertEncoding) {
            return $str;
        }

        $fromEncoding = $reverse ? $convertEncoding : $encoding;
        $toEncoding   = $reverse ? $encoding : $convertEncoding;
        return mb_convert_encoding($str, $toEncoding, $fromEncoding);
    }
public function convert ( $ str , $ reverse = false ) { $ encoding = $ this -> getEncoding ( ) ; $ convertEncoding = $ this -> getConvertEncoding ( ) ; if ( $ convertEncoding === null ) { throw new Exception \ LogicException ( 'No convert encoding defined' ) ; } if ( $ encoding === $ convertEncoding ) { return $ str ; } $ fromEncoding = $ reverse ? $ convertEncoding : $ encoding ; $ toEncoding = $ reverse ? $ encoding : $ convertEncoding ; return mb_convert_encoding ( $ str , $ toEncoding , $ fromEncoding ) ; }
Convert a string from defined encoding to the defined convert encoding

@param string  $str
@param bool $reverse
@return string|false
Convert a string from defined encoding to the defined convert encoding