Skip to main content Link Menu Expand (external link) Document Search Copy Copied

char overview

Added in v0.6.0


Table of contents


combinators

alphanum

Matches a single letter, digit or underscore character.

Signature

export declare const alphanum: P.Parser<string, string>

Added in v0.6.0

digit

Matches a single digit.

Signature

export declare const digit: P.Parser<string, string>

Added in v0.6.0

lower

Matches a single lower case ASCII letter.

Signature

export declare const lower: P.Parser<string, string>

Added in v0.6.0

many

Takes a Parser<Char, string> and matches it zero or more times, returning a string of what was matched.

Signature

export declare const many: (parser: P.Parser<Char, Char>) => P.Parser<Char, string>

Added in v0.6.0

many1

Takes a Parser<Char, string> and matches it one or more times, returning a string of what was matched.

Signature

export declare const many1: (parser: P.Parser<Char, Char>) => P.Parser<Char, string>

Added in v0.6.0

notAlphanum

Matches a single character which isn’t a letter, digit or underscore.

Signature

export declare const notAlphanum: P.Parser<string, string>

Added in v0.6.0

notDigit

Matches a single character which isn’t a digit.

Signature

export declare const notDigit: P.Parser<string, string>

Added in v0.6.0

notLetter

Matches a single character which isn’t an ASCII letter.

Signature

export declare const notLetter: P.Parser<string, string>

Added in v0.6.0

notLower

Matches a single character which isn’t a lower case ASCII letter.

Signature

export declare const notLower: P.Parser<string, string>

Added in v0.6.0

notSpace

Matches a single character which isn’t whitespace.

Signature

export declare const notSpace: P.Parser<string, string>

Added in v0.6.0

notUpper

Matches a single character which isn’t an upper case ASCII letter.

Signature

export declare const notUpper: P.Parser<string, string>

Added in v0.6.0

space

Matches a single whitespace character.

Signature

export declare const space: P.Parser<string, string>

Added in v0.6.0

unicodeLetter

Matches a single Unicode letter. Works for scripts which have a notion of an upper case and lower case letters (Latin-based scripts, Greek, Russian etc).

Signature

export declare const unicodeLetter: P.Parser<string, string>

Added in v0.6.16

upper

Matches a single upper case ASCII letter.

Signature

export declare const upper: P.Parser<string, string>

Added in v0.6.0

constructors

char

The char parser constructor returns a parser which matches only the specified single character

Signature

export declare const char: (c: Char) => P.Parser<Char, Char>

Added in v0.6.0

notChar

The notChar parser constructor makes a parser which will match any single character other than the one provided.

Signature

export declare const notChar: (c: Char) => P.Parser<Char, Char>

Added in v0.6.0

notOneOf

Matches a single character which isn’t a character from the provided string.

Signature

export declare const notOneOf: (s: string) => P.Parser<Char, Char>

Added in v0.6.0

oneOf

Matches any one character from the provided string.

Signature

export declare const oneOf: (s: string) => P.Parser<Char, Char>

Added in v0.6.0

model

Char (type alias)

Signature

export type Char = string

Added in v0.6.0

utils

letter

Matches a single ASCII letter.

Signature

export declare const letter: P.Parser<string, string>

Added in v0.6.0