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

stringfalse

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

stringfalse

Get the defined character encoding to convert to

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

Returns

stringnull

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

stringnull

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

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
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

integerfalse

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

integerfalse

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

integernull

Returns

stringfalse

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

stringfalse

 Properties

 

An optionally character encoding to convert to

$convertEncoding : string | null

Default

 

The character encoding working on

$encoding : string | null

Default

'UTF-8'
 

List of supported character sets (upper case)

$encodings : array<mixed,string>

Default

array('ASCII', 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4', 'ISO-8859-5', 'ISO-8859-7', 'ISO-8859-9', 'ISO-8859-10', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16', 'KOI8-R', 'KOI8-U', 'KOI8-RU', 'CP1250', 'CP1251', 'CP1252', 'CP1253', 'CP1254', 'CP1257', 'CP850', 'CP866', 'CP1131', 'MACROMAN', 'MACCENTRALEUROPE', 'MACICELAND', 'MACCROATIAN', 'MACROMANIA', 'MACCYRILLIC', 'MACUKRAINE', 'MACGREEK', 'MACTURKISH', 'MACINTOSH', 'ISO-8859-6', 'ISO-8859-8', 'CP1255', 'CP1256', 'CP862', 'MACHEBREW', 'MACARABIC', 'EUC-JP', 'SHIFT_JIS', 'CP932', 'ISO-2022-JP', 'ISO-2022-JP-2', 'ISO-2022-JP-1', 'EUC-CN', 'HZ', 'GBK', 'CP936', 'GB18030', 'EUC-TW', 'BIG5', 'CP950', 'BIG5-HKSCS', 'BIG5-HKSCS:2004', 'BIG5-HKSCS:2001', 'BIG5-HKSCS:1999', 'ISO-2022-CN', 'ISO-2022-CN-EXT', 'EUC-KR', 'CP949', 'ISO-2022-KR', 'JOHAB', 'ARMSCII-8', 'GEORGIAN-ACADEMY', 'GEORGIAN-PS', 'KOI8-T', 'PT154', 'RK1048', 'ISO-8859-11', 'TIS-620', 'CP874', 'MACTHAI', 'MULELAO-1', 'CP1133', 'VISCII', 'TCVN', 'CP1258', 'HP-ROMAN8', 'NEXTSTEP', 'UTF-8', 'UCS-2', 'UCS-2BE', 'UCS-2LE', 'UCS-4', 'UCS-4BE', 'UCS-4LE', 'UTF-16', 'UTF-16BE', 'UTF-16LE', 'UTF-32', 'UTF-32BE', 'UTF-32LE', 'UTF-7', 'C99', 'JAVA', 'CP437', 'CP737', 'CP775', 'CP852', 'CP853', 'CP855', 'CP857', 'CP858', 'CP860', 'CP861', 'CP863', 'CP865', 'CP869', 'CP1125', 'CP864', 'EUC-JISX0213', 'Shift_JISX0213', 'ISO-2022-JP-3', 'BIG5-2003', 'TDS565', 'ATARIST', 'RISCOS-LATIN1')
Static