Version: 0.8.1

predicates

isEqual

Creates an equality predicate

function isEqual(string $x) : callable

notPred

Negates a predicate.

function notPred(callable $predicate) : callable

andPred

Boolean And predicate.

function andPred(callable $first, callable $second) : callable

orPred

Boolean Or predicate.

function orPred(callable $first, callable $second) : callable

isCharCode

Predicate that checks if a character is in an array of character codes.

function isCharCode(array $chars) : callable

isSpace

Returns true for a space character, and the control characters \t, \n, \r, \f, \v.

function isSpace() : callable

isHSpace

Like 'isSpace', but does not accept newlines and carriage returns.

function isHSpace() : callable

isDigit

True for 0-9

function isDigit() : callable

isControl

Control character predicate (a non-printing character of the Latin-1 subset of Unicode).

function isControl() : callable

isBlank

Returns true for a space or a tab character

function isBlank()

isWhitespace

Returns true for a space character, and \t, \n, \r, \f, \v.

function isWhitespace()

isUpper

Returns true for an uppercase character A-Z.

function isUpper()

isLower

Returns true for a lowercase character a-z.

function isLower()

isAlpha

Returns true for an uppercase or lowercase character A-Z, a-z.

function isAlpha()

isAlphaNum

Returns true for an alpha or numeric character A-Z, a-z, 0-9.

function isAlphaNum()

isHexDigit

Returns true if the given character is a hexadecimal numeric character 0123456789abcdefABCDEF.

function isHexDigit()

isPrintable

Returns true if the given character is a printable ASCII char.

function isPrintable()

isPunctuation

Returns true if the given character is a punctuation character !"#$%&'()*+,-./:;<=>?@[]^_`{|}~

function isPunctuation()