package |
Default |
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper |
Methods
Constructor
__construct()
Exceptions
\Zend\Stdlib\Exception\ExtensionNotLoadedException |
|
Convert a string from defined encoding to the defined convert encoding
convert(string $str, boolean $reverse = false
) : string | false
inherited_from |
\Zend\Stdlib\StringWrapper\AbstractStringWrapper::convert() |
Parameters
$str
string
$reverse
boolean
Returns
string
false
Convert a string from defined character encoding to the defined convert encoding
convert(string $str, boolean $reverse = false
) : string | false
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\StringWrapperInterface::convert() |
Parameters
$str
string
$reverse
boolean
Returns
string
false
Get the defined character encoding to convert to
getConvertEncoding() : string | null
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\StringWrapperInterface::getConvertEncoding() |
Returns
string
null
Get the defined character encoding to work with
getEncoding() : string
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\StringWrapperInterface::getEncoding() |
Exceptions
\Zend\Stdlib\Exception\LogicException |
If no encoding was defined |
Returns
string
Get a list of supported character encodings
getSupportedEncodings() : array<mixed,string>
Static
Returns
array<mixed,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 = null
) : boolean
InheritedStatic
inherited_from |
\Zend\Stdlib\StringWrapper\StringWrapperInterface::isSupported() |
Parameters
$encoding
string
$convertEncoding
string
null
Returns
boolean
Set character encoding working with and convert to
setEncoding(string $encoding, string|null $convertEncoding = null
) : \Zend\Stdlib\StringWrapper\StringWrapperInterface
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\StringWrapperInterface::setEncoding() |
Parameters
$encoding
string
The character encoding to work with
$convertEncoding
string
null
The character encoding to convert to
Returns
\Zend\Stdlib\StringWrapper\StringWrapperInterface
Pad a string to a certain length with another string
strPad(string $input, integer $padLength, string $padString = ' '
, integer $padType = STR_PAD_RIGHT
) : string
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\StringWrapperInterface::strPad() |
Parameters
$input
string
$padLength
integer
$padString
string
$padType
integer
Returns
string
Returns the length of the given string
strlen(string $str) : integer | false
Parameters
$str
string
Returns
integer
false
Find the position of the first occurrence of a substring in a string
strpos(string $haystack, string $needle, integer $offset = 0
) : integer | false
Parameters
$haystack
string
$needle
string
$offset
integer
Returns
integer
false
Returns the portion of string specified by the start and length parameters
substr(string $str, integer $offset = 0
, integer|null $length = null
) : string | false
Parameters
$str
string
$offset
integer
$length
integer
null
Returns
string
false
Wraps a string to a given number of characters
wordWrap(string $string, integer $width = 75
, string $break = "\n"
, boolean $cut = false
) : string | false
Inherited
inherited_from |
\Zend\Stdlib\StringWrapper\StringWrapperInterface::wordWrap() |
Parameters
$string
string
$width
integer
$break
string
$cut
boolean
Returns
string
false
Properties
An optionally character encoding to convert to
$convertEncoding : string | null
The character encoding working on
$encoding : string | null
List of supported character sets (upper case)
$encodings : null | array<mixed,string>
Static