You are here

public static function StringUtils::isSingleByteEncoding in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-stdlib/src/StringUtils.php \Zend\Stdlib\StringUtils::isSingleByteEncoding()

Check if a given encoding is a known single-byte character encoding

Parameters

string $encoding:

Return value

bool

2 calls to StringUtils::isSingleByteEncoding()
AbstractStringWrapper::strPad in vendor/zendframework/zend-stdlib/src/StringWrapper/AbstractStringWrapper.php
Pad a string to a certain length with another string
AbstractStringWrapper::wordWrap in vendor/zendframework/zend-stdlib/src/StringWrapper/AbstractStringWrapper.php
Wraps a string to a given number of characters

File

vendor/zendframework/zend-stdlib/src/StringUtils.php, line 157

Class

StringUtils
Utility class for handling strings of different character encodings using available PHP extensions.

Namespace

Zend\Stdlib

Code

public static function isSingleByteEncoding($encoding) {
  return in_array(strtoupper($encoding), static::$singleByteEncodings);
}