Module

Text.Parsing.StringParser.CodeUnits

Package
purescript-string-parsers
Repository
purescript-contrib/purescript-string-parsers

Primitive parsers for strings, parsing based on code units.

These functions will be much faster than the CodePoints alternatives, but will behave incorrectly when dealing with Unicode characters that consist of multiple code units.

#eof Source

eof :: Parser Unit

Match the end of the file.

#anyChar Source

anyChar :: Parser Char

Match any character.

#anyDigit Source

anyDigit :: Parser Char

Match any digit.

#string Source

string :: String -> Parser String

Match the specified string.

#satisfy Source

satisfy :: (Char -> Boolean) -> Parser Char

Match a character satisfying the given predicate.

#char Source

char :: Char -> Parser Char

Match the specified character.

#whiteSpace Source

whiteSpace :: Parser String

Match many whitespace characters.

#skipSpaces Source

skipSpaces :: Parser Unit

Skip many whitespace characters.

#oneOf Source

oneOf :: forall f. Foldable f => f Char -> Parser Char

Match one of the characters in the foldable structure.

#noneOf Source

noneOf :: forall f. Foldable f => f Char -> Parser Char

Match any character not in the foldable structure.

#lowerCaseChar Source

lowerCaseChar :: Parser Char

Match any lower case character.

#upperCaseChar Source

upperCaseChar :: Parser Char

Match any upper case character.

#anyLetter Source

anyLetter :: Parser Char

Match any letter.

#alphaNum Source

alphaNum :: Parser Char

Match a letter or a number.

#regex Source

regex :: String -> Parser String

match the regular expression