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

string overview

Added in v0.6.0


Table of contents


combinators

doubleQuotedString

Parses a double quoted string, with support for escaping double quotes inside it, and returns the inner string. Does not perform any other form of string escaping.

Signature

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

Added in v0.6.0

float

Signature

export declare const float: P.Parser<string, number>

Added in v0.6.0

int

Signature

export declare const int: P.Parser<string, number>

Added in v0.6.0

many

Matches the given parser zero or more times, returning a string of the entire match

Signature

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

Added in v0.6.0

many1

Matches the given parser one or more times, returning a string of the entire match

Signature

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

Added in v0.6.0

maybe

Signature

export declare const maybe: <I>(p: P.Parser<I, string>) => P.Parser<I, string>

Added in v0.6.0

notSpaces

Matches zero or more non-whitespace characters.

Signature

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

Added in v0.6.0

notSpaces1

Matches one or more non-whitespace characters.

Signature

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

Added in v0.6.0

run

Signature

export declare function run(string: string): <A>(p: P.Parser<C.Char, A>) => PR.ParseResult<C.Char, A>

Added in v0.6.8

spaces

Matches zero or more whitespace characters.

Signature

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

Added in v0.6.0

spaces1

Matches one or more whitespace characters.

Signature

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

Added in v0.6.0

constructors

oneOf

Matches one of a list of strings.

Signature

export declare function oneOf<F extends URIS>(
  F: Functor1<F> & Foldable1<F>
): (ss: Kind<F, string>) => P.Parser<C.Char, string>
export declare function oneOf<F>(F: Functor<F> & Foldable<F>): (ss: HKT<F, string>) => P.Parser<C.Char, string>

Added in v0.6.0

string

Matches the exact string provided.

Signature

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

Added in v0.6.0

destructors

fold

Signature

export declare const fold: <I>(as: P.Parser<I, string>[]) => P.Parser<I, string>

Added in v0.6.0