\Symfony\Polyfill\CtypeCtype

Ctype implementation through regex.

Summary

Methods
Properties
Constants
ctype_alnum()
ctype_alpha()
ctype_cntrl()
ctype_digit()
ctype_graph()
ctype_lower()
ctype_print()
ctype_punct()
ctype_space()
ctype_upper()
ctype_xdigit()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
convert_int_to_char_for_ctype()
No private properties found
N/A

Methods

ctype_alnum()

ctype_alnum(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_alpha()

ctype_alpha(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_cntrl()

ctype_cntrl(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_digit()

ctype_digit(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_graph()

ctype_graph(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_lower()

ctype_lower(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_print()

ctype_print(string|integer  $text) : 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.

Parameters

string|integer $text

Returns

boolean

ctype_punct()

ctype_punct(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_space()

ctype_space(string|integer  $text) : 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.

Parameters

string|integer $text

Returns

boolean

ctype_upper()

ctype_upper(string|integer  $text) : boolean

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

Parameters

string|integer $text

Returns

boolean

ctype_xdigit()

ctype_xdigit(string|integer  $text) : 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.

Parameters

string|integer $text

Returns

boolean

convert_int_to_char_for_ctype()

convert_int_to_char_for_ctype(string|integer  $int) : mixed

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

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.

Parameters

string|integer $int

Returns

mixed