Class MultiByte
Shared multi-byte character set implementation based on the PHP Multi-byte String Extension.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Charset
- Core\Charset\MultiByte
Direct known subclasses
Core\Charset\Driver\sjis
,
Core\Charset\Driver\utf16
,
Core\Charset\Driver\utf16be
,
Core\Charset\Driver\utf16le
,
Core\Charset\Driver\utf32
,
Core\Charset\Driver\utf32be
,
Core\Charset\Driver\utf32le
,
Core\Charset\Driver\utf8
Namespace: Core\Charset
Package: Core\Charset
Since: 3.1
Requires: PHP 5.3, MBString
Version: 1.0
Located at Charset/MultiByte.inc.php
Methods summary
public
|
|
public
string
|
#
convertFromUTF8( string $string )
Converts a string encoded in UTF-8 to the current character set. |
public
string
|
#
convertToUTF8( string $string )
Converts a string encoded in the character set of this instance to UTF-8. |
public
|
|
public
string
|
#
pad( string $string, integer $length, string $padding, integer $flags, string $truncationMarker = null )
Fits a string by padding or truncation to a desired length. Padding uses characters from from an optional padding string. |
public
string
|
#
sub( string $string, integer $from, integer $length = null )
Returns a substring of a given string. |
public
string
|
#
toLower( string $string )
Transforms a given string to lowercase based on Unicode character properties with respect to this character set. |
public
string
|
#
toUpper( string $string )
Transforms a given string to uppercase based on Unicode character properties with respect to this character set. |
public
string
|
#
truncate( string $string, integer $start, integer $width, string $marker = null )
Truncates a string based on the desired visual width of the string. |
public
integer
|
Methods inherited from Core\Charset
_restoreEnvironment()
,
_setupEnvironment()
,
activate()
,
active()
,
alias()
,
all()
,
convertFrom()
,
convertFromActive()
,
convertTo()
,
convertToActive()
,
convertUCS2ToUTF8()
,
convertUTF8ToUCS2()
,
format()
,
get()
,
hash()
,
iterator()
,
registerAlias()
,
sizeof()
,
vformat()
,
xmlSpecials()
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
chain()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
Constants inherited from Core\Charset
ACK
,
BEL
,
BS
,
CAN
,
CR
,
CRLF
,
DEL
,
DLE
,
DoubleQuotesFlag
,
EM
,
ENQ
,
EOT
,
ESC
,
ETB
,
ETX
,
FF
,
FS
,
GS
,
LF
,
LeftPadFlag
,
NAK
,
NUL
,
NoQuotesFlag
,
RS
,
RightPadFlag
,
SI
,
SO
,
SOH
,
STX
,
SUB
,
SYN
,
SingleQuotesFlag
,
TAB
,
TruncatePadFlag
,
US
,
VT
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
Properties inherited from Core\Charset
$_activeInstance
,
$_aliasMap
,
$_instances
,
$_v_displayName
,
$_v_name