Vendor/langcode-conv/zendframework/zend-stdlib/src/StringUtils.php
public static function getWrapper($encoding = 'UTF-8', $convertEncoding = null)
    {
        foreach (static::getRegisteredWrappers() as $wrapperClass) {
            if ($wrapperClass::isSupported($encoding, $convertEncoding)) {
                $wrapper = new $wrapperClass($encoding, $convertEncoding);
                $wrapper->setEncoding($encoding, $convertEncoding);
                return $wrapper;
            }
        }

        throw new Exception\RuntimeException(
            'No wrapper found supporting "' . $encoding . '"'
            . (($convertEncoding !== null) ? ' and "' . $convertEncoding . '"' : '')
        );
    }
public static function getWrapper($encoding = 'UTF-8', $convertEncoding = null)
    {
        foreach (static::getRegisteredWrappers() as $wrapperClass) {
            if ($wrapperClass::isSupported($encoding, $convertEncoding)) {
                $wrapper = new $wrapperClass($encoding, $convertEncoding);
                $wrapper->setEncoding($encoding, $convertEncoding);
                return $wrapper;
            }
        }

        throw new Exception\RuntimeException(
            'No wrapper found supporting "' . $encoding . '"'
            . (($convertEncoding !== null) ? ' and "' . $convertEncoding . '"' : '')
        );
    }
public static function getWrapper ( $ encoding = 'UTF-8' , $ convertEncoding = null ) { foreach ( static :: getRegisteredWrappers ( ) as $ wrapperClass ) { if ( $ wrapperClass :: isSupported ( $ encoding , $ convertEncoding ) ) { $ wrapper = new $ wrapperClass ( $ encoding , $ convertEncoding ) ; $ wrapper -> setEncoding ( $ encoding , $ convertEncoding ) ; return $ wrapper ; } } throw new Exception \ RuntimeException ( 'No wrapper found supporting "' . $ encoding . '"' . ( ( $ convertEncoding !== null ) ? ' and "' . $ convertEncoding . '"' : '' ) ) ; }
Get the first string wrapper supporting the given character encoding
and supports to convert into the given convert encoding.

@param string      $encoding        Character encoding to support
@param string|null $convertEncoding OPTIONAL character encoding to convert in
@return StringWrapperInterface
@throws Exception\RuntimeException If no wrapper supports given character encodings
Get the first string wrapper supporting the given character encoding and supports to convert into the given convert encoding .