Skip to content

Latest commit

 

History

History
273 lines (194 loc) · 4.78 KB

File metadata and controls

273 lines (194 loc) · 4.78 KB

char

  • class char (php\lib\char)
  • package std
  • source php/lib/char.php

Description

Char Utils for working with unicode chars (using string[0] char)

Class char


Static Methods


Methods


Static Methods

of()

char::of(int $code): string

ord()

char::ord(string $char): int

count()

char::count(int $code): int

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.


compare()

char::compare(string $char1, string $char2): int

lower()

char::lower(string $char): string

upper()

char::upper(string $char): string

title()

char::title(string $char): string

isSpace()

char::isSpace(string $char): bool

isDigit()

char::isDigit(string $char): bool

isLetter()

char::isLetter(string $char): bool

isLetterOrDigit()

char::isLetterOrDigit(string $char): bool

isLower()

char::isLower(string $char): bool

isUpper()

char::isUpper(string $char): bool

isTitle()

char::isTitle(string $char): bool

isWhitespace()

char::isWhitespace(string $char): bool

isISOControl()

char::isISOControl(string $char): bool

isDefined()

char::isDefined(string $char): bool

Determines if a character is defined in Unicode.


isMirrored()

char::isMirrored(string $char): bool

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.


isLowSurrogate()

char::isLowSurrogate(string $char): bool

Determines if the given $char value is a Unicode low-surrogate code unit (also known as trailing-surrogate code unit).


isHighSurrogate()

char::isHighSurrogate(string $char): bool

Determines if the given $char value is a Unicode high-surrogate code unit (also known as leading-surrogate code unit).


isPrintable()

char::isPrintable(string $char): bool

number()

char::number(string $char): int

Returns the {@code int} value that the specified Unicode character represents.


Methods

__construct()

__construct(): void