Methods
Constructor
__construct()
Convert a string from defined encoding to the defined convert encoding
convert(string $str, bool $reverse) : string | false
Parameters
$str
string
$reverse
bool
Returns
string
false
Get the defined character encoding to convert to
getConvertEncoding() : string | null
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::getConvertEncoding() |
Returns
string
null
Get the defined character encoding to work with
getEncoding() : string
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::getEncoding() |
Exceptions
Returns
string
Get a list of supported character encodings
getSupportedEncodings() : string[]
Check if the given character encoding is supported by this wrapper
and the character encoding to convert to is also supported.
isSupported(string $encoding, string | null $convertEncoding) : bool
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::isSupported() |
Parameters
$encoding
string
$convertEncoding
stringnull
Returns
bool
Set character encoding working with and convert to
setEncoding(string $encoding, string | null $convertEncoding) : \Zend\Stdlib\StringWrapper\StringWrapperInterface
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::setEncoding() |
Parameters
$encoding
string
The character encoding to work with
$convertEncoding
stringnull
The character encoding to convert to
Returns
Pad a string to a certain length with another string
strPad(string $input, int $padLength, string $padString, int $padType) : string
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::strPad() |
Parameters
$input
string
$padLength
int
$padString
string
$padType
int
Returns
string
Returns the length of the given string
strlen(string $str) : int | false
Parameters
$str
string
Returns
int
false
Find the position of the first occurrence of a substring in a string
strpos(string $haystack, string $needle, int $offset) : int | false
Parameters
$haystack
string
$needle
string
$offset
int
Returns
int
false
Returns the portion of string specified by the start and length parameters
substr(string $str, int $offset, int | null $length) : string | false
Parameters
$str
string
$offset
int
$length
intnull
Returns
string
false
Wraps a string to a given number of characters
wordWrap(string $string, int $width, string $break, bool $cut) : string | false
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::wordWrap() |
Parameters
$string
string
$width
int
$break
string
$cut
bool
Returns
string
false
Properties
An optionally character encoding to convert to
$convertEncoding : string | null
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::$$convertEncoding |
The character encoding working on
$encoding : string | null
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::$$encoding |
List of supported character sets (upper case)
$encodings : null | string[]