characters.php
This file is part of the Parsica library.
Copyright (c) 2020 Mathias Verraes mathias@verraes.net
For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
Table of Contents
Functions
- char() : Parser
- Parse a single character.
- charI() : Parser
- Parse a single character, case-insensitive and case-preserving. On success, it returns the string cased as the actually parsed input.
- controlChar() : Parser
- Parse a control character (a non-printing character of the Latin-1 subset of Unicode).
- upperChar() : Parser
- Parse an uppercase character A-Z.
- lowerChar() : Parser
- Parse a lowercase character a-z.
- alphaChar() : Parser
- Parse an uppercase or lowercase character A-Z, a-z.
- alphaNumChar() : Parser
- Parse an alpha or numeric character A-Z, a-z, 0-9.
- printChar() : Parser
- Parse a printable ASCII char.
- punctuationChar() : Parser
- Parse a single punctuation character !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
- digitChar() : Parser
- Parse 0-9. Returns the digit as a string. Use ->map('intval') or similar to cast it to a numeric type.
- binDigitChar() : Parser
- Parse a binary character 0 or 1.
- octDigitChar() : Parser
- Parse an octodecimal character 0-7.
- hexDigitChar() : Parser
- Parse a hexadecimal numeric character 0123456789abcdefABCDEF.
Functions
char()
Parse a single character.
char(string $c) : Parser
Parameters
- $c : string
Tags
Return values
ParsercharI()
Parse a single character, case-insensitive and case-preserving. On success, it returns the string cased as the actually parsed input.
charI(string $c) : Parser
eg charI('a'')->run("ABC") will succeed with "A", not "a".
Parameters
- $c : string
Tags
Return values
ParsercontrolChar()
Parse a control character (a non-printing character of the Latin-1 subset of Unicode).
controlChar() : Parser
Tags
Return values
ParserupperChar()
Parse an uppercase character A-Z.
upperChar() : Parser
Tags
Return values
ParserlowerChar()
Parse a lowercase character a-z.
lowerChar() : Parser
Tags
Return values
ParseralphaChar()
Parse an uppercase or lowercase character A-Z, a-z.
alphaChar() : Parser
Tags
Return values
ParseralphaNumChar()
Parse an alpha or numeric character A-Z, a-z, 0-9.
alphaNumChar() : Parser
Tags
Return values
ParserprintChar()
Parse a printable ASCII char.
printChar() : Parser
Tags
Return values
ParserpunctuationChar()
Parse a single punctuation character !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
punctuationChar() : Parser
Tags
Return values
ParserdigitChar()
Parse 0-9. Returns the digit as a string. Use ->map('intval') or similar to cast it to a numeric type.
digitChar() : Parser
Tags
Return values
ParserbinDigitChar()
Parse a binary character 0 or 1.
binDigitChar() : Parser
Tags
Return values
ParseroctDigitChar()
Parse an octodecimal character 0-7.
octDigitChar() : Parser
Tags
Return values
ParserhexDigitChar()
Parse a hexadecimal numeric character 0123456789abcdefABCDEF.
hexDigitChar() : Parser