Vendor/langcode-conv/zendframework/zend-stdlib/src/StringWrapper/AbstractStringWrapper.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;
        }

        $from = $reverse ? $convertEncoding : $encoding;
        $to   = $reverse ? $encoding : $convertEncoding;
        throw new Exception\RuntimeException(sprintf(
            'Converting from "%s" to "%s" isn\'t supported by this string wrapper',
            $from,
            $to
        ));
    }
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;
        }

        $from = $reverse ? $convertEncoding : $encoding;
        $to   = $reverse ? $encoding : $convertEncoding;
        throw new Exception\RuntimeException(sprintf(
            'Converting from "%s" to "%s" isn\'t supported by this string wrapper',
            $from,
            $to
        ));
    }
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 ; } $ from = $ reverse ? $ convertEncoding : $ encoding ; $ to = $ reverse ? $ encoding : $ convertEncoding ; throw new Exception \ RuntimeException ( sprintf ( 'Converting from "%s" to "%s" isn\'t supported by this string wrapper' , $ from , $ to ) ) ; }
Convert a string from defined character encoding to the defined convert encoding

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