Fully Qualified Name: | Zend\Stdlib\StringUtils |
Utility class for handling strings of different character encodings using available PHP extensions.
Declared abstract, as we have no need for instantiation.
Name | Description | Defined By |
---|---|---|
getRegisteredWrappers() | Get registered wrapper classes | StringUtils |
getSingleByteEncodings() | Get a list of all known single-byte character encodings | StringUtils |
getWrapper() | Get the first string wrapper supporting the given character encoding and supports to convert into the given convert encoding. | StringUtils |
hasPcreUnicodeSupport() | Is PCRE compiled with Unicode support? | StringUtils |
isSingleByteEncoding() | Check if a given encoding is a known single-byte character encoding | StringUtils |
isValidUtf8() | Check if a given string is valid UTF-8 encoded | StringUtils |
registerWrapper() | Register a string wrapper class | StringUtils |
resetRegisteredWrappers() | Reset all registered wrappers so the default wrappers will be used | StringUtils |
unregisterWrapper() | Unregister a string wrapper class | StringUtils |
Get registered wrapper classes
Returns: string[]
Get a list of all known single-byte character encodings
Returns: string[]
Get the first string wrapper supporting the given character encoding and supports to convert into the given convert encoding.
Parameter Name | Type | Description |
---|---|---|
$encoding | string | Character |
$convertEncoding | string|null | OPTIONAL |
Returns: \StringWrapperInterface
Is PCRE compiled with Unicode support?
Returns: bool
Check if a given encoding is a known single-byte character encoding
Parameter Name | Type | Description |
---|---|---|
$encoding | string |
Returns: bool
Check if a given string is valid UTF-8 encoded
Parameter Name | Type | Description |
---|---|---|
$str | string |
Returns: bool
Register a string wrapper class
Parameter Name | Type | Description |
---|---|---|
$wrapper | string |
Returns: void
Reset all registered wrappers so the default wrappers will be used
Returns: void
Unregister a string wrapper class
Parameter Name | Type | Description |
---|---|---|
$wrapper | string |
Returns: void