Version: 0.4.0

characters

char

Parse a single character.

function char(string $c) : Parser

charI

Parse a single character, case-insensitive and case-preserving. On success it returns the string cased as the actually parsed input.

eg charI('a'')->run("ABC") will succeed with "A", not "a".

function charI(string $c) : Parser

controlChar

Parse a control character (a non-printing character of the Latin-1 subset of Unicode).

function controlChar() : Parser

upperChar

Parse an uppercase character A-Z.

function upperChar() : Parser

lowerChar

Parse a lowercase character a-z.

function lowerChar() : Parser

alphaChar

Parse an uppercase or lowercase character A-Z, a-z.

function alphaChar() : Parser

alphaNumChar

Parse an alpha or numeric character A-Z, a-z, 0-9.

function alphaNumChar() : Parser

printChar

Parse a printable ASCII char.

function printChar() : Parser

punctuationChar

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

function punctuationChar() : Parser

digitChar

Parse 0-9. Returns the digit as a string. Use ->map('intval') or similar to cast it to a numeric type.

function digitChar() : Parser

binDigitChar

Parse a binary character 0 or 1.

function binDigitChar() : Parser

octDigitChar

Parse an octodecimal character 0-7.

function octDigitChar() : Parser

hexDigitChar

Parse a hexadecimal numeric character 0123456789abcdefABCDEF.

function hexDigitChar() : Parser