package Default

 Methods

Convert a string from defined character encoding to the defined convert encoding

convert(string $str, boolean $reverse = false) : string | false
inherited_from \Zend\Stdlib\StringWrapper\StringWrapperInterface::convert()

Parameters

$str

string

$reverse

boolean

Returns

stringfalse

Get the defined character encoding to convert to

getConvertEncoding() : string | null
inherited_from \Zend\Stdlib\StringWrapper\StringWrapperInterface::getConvertEncoding()

Returns

stringnull

Get the defined character encoding to work with

getEncoding() : string
inherited_from \Zend\Stdlib\StringWrapper\StringWrapperInterface::getEncoding()

Exceptions

\Zend\Stdlib\Exception\LogicException If no encoding was defined

Returns

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
Static
inherited_from \Zend\Stdlib\StringWrapper\StringWrapperInterface::isSupported()

Parameters

$encoding

string

$convertEncoding

stringnull

Returns

boolean

Set character encoding working with and convert to

setEncoding(string $encoding, string|null $convertEncoding = null) : \Zend\Stdlib\StringWrapper\StringWrapperInterface
inherited_from \Zend\Stdlib\StringWrapper\StringWrapperInterface::setEncoding()

Parameters

$encoding

string

The character encoding to work with

$convertEncoding

stringnull

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_from \Zend\Stdlib\StringWrapper\StringWrapperInterface::strPad()

Parameters

$input

string

$padLength

integer

$padString

string

$padType

integer

Returns

string

Wraps a string to a given number of characters

wordWrap(string $string, integer $width = 75, string $break = "\n", boolean $cut = false) : string | false
inherited_from \Zend\Stdlib\StringWrapper\StringWrapperInterface::wordWrap()

Parameters

$string

string

$width

integer

$break

string

$cut

boolean

Returns

stringfalse

 Properties

 

An optionally character encoding to convert to

$convertEncoding : string | null

Default

 

The character encoding working on

$encoding : string | null

Default

'UTF-8'