Ctype

Ctype implementation through regex.

internal
author

Gert de Pagter BackEndTea@gmail.com

package

Default

Methods

Converts integers to their char versions according to normal ctype behaviour, if needed.

convert_int_to_char_for_ctype(mixed $int,string $function): mixed
static

If an integer between -128 and 255 inclusive is provided, it is interpreted as the ASCII value of a single character (negative values have 256 added in order to allow characters in the Extended ASCII range). Any other integer is interpreted as a string containing the decimal digits of the integer.

Arguments

$int

mixed

$function

string

Response

mixed

Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise.

ctype_alnum(mixed $text): boolean
static
see https://php.net/ctype-alnum

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text is a letter, FALSE otherwise.

ctype_alpha(mixed $text): boolean
static
see https://php.net/ctype-alpha

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.

ctype_cntrl(mixed $text): boolean
static
see https://php.net/ctype-cntrl

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.

ctype_digit(mixed $text): boolean
static
see https://php.net/ctype-digit

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.

ctype_graph(mixed $text): boolean
static
see https://php.net/ctype-graph

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text is a lowercase letter.

ctype_lower(mixed $text): boolean
static
see https://php.net/ctype-lower

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.

ctype_print(mixed $text): boolean
static
see https://php.net/ctype-print

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.

ctype_punct(mixed $text): boolean
static
see https://php.net/ctype-punct

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.

ctype_space(mixed $text): boolean
static
see https://php.net/ctype-space

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text is an uppercase letter.

ctype_upper(mixed $text): boolean
static
see https://php.net/ctype-upper

Arguments

$text

mixed

Response

boolean

Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.

ctype_xdigit(mixed $text): boolean
static
see https://php.net/ctype-xdigit

Arguments

$text

mixed

Response

boolean