Char¶
-
php\lib\Char
Char Utils for working with unicode chars (using string[0] char)
Class char
Methods
__construct
()¶private
- static
of
($code)¶
Parameters:
- $code – int
Returns: string
- static
ord
($char)¶
Parameters:
- $char – string
Returns: int
- static
count
($code)¶Determines the number of {@code char} values needed to represent the specified character (Unicode code point). If the specified character is equal to or greater than 0x10000, then the method returns 2. Otherwise, the method returns 1.
Parameters:
- $code – int
Returns: int
- static
compare
($char1, $char2)¶
Parameters:
- $char1 – string
- $char2 – string
Returns: int
- static
lower
($char)¶
Parameters:
- $char – string
Returns: string
- static
upper
($char)¶
Parameters:
- $char – string
Returns: string
- static
title
($char)¶
Parameters:
- $char – string
Returns: string
- static
isSpace
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isDigit
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isLetter
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isLetterOrDigit
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isLower
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isUpper
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isTitle
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isWhitespace
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isISOControl
($char)¶
Parameters:
- $char – string
Returns: bool
- static
isDefined
($char)¶Determines if a character is defined in Unicode.
Parameters:
- $char – string
Returns: bool
- static
isMirrored
($char)¶Determines whether the specified character (Unicode code point) is mirrored according to the Unicode specification. Mirrored characters should have their glyphs horizontally mirrored when displayed in text that is right-to-left.
Parameters:
- $char – string
Returns: bool
- static
isLowSurrogate
($char)¶Determines if the given $char value is a <a href=”http://www.unicode.org/glossary/#low_surrogate_code_unit“> Unicode low-surrogate code unit</a> (also known as <i>trailing-surrogate code unit</i>).
Parameters:
- $char – string
Returns: bool
- static
isHighSurrogate
($char)¶Determines if the given $char value is a <a href=”http://www.unicode.org/glossary/#high_surrogate_code_unit“> Unicode high-surrogate code unit</a> (also known as <i>leading-surrogate code unit</i>).
Parameters:
- $char – string
Returns: bool
- static
isPrintable
($char)¶
Parameters:
- $char – string
Returns: bool