@@ -14,6 +14,8 @@ module Streamly.Internal.Unicode.Char.Parser
1414 (
1515 -- * Generic
1616 char
17+ , dropSpace
18+ , dropSpace1
1719
1820 -- * Classes
1921 , alpha
@@ -138,6 +140,18 @@ CHAR_PARSER(asciiLower,isAsciiLower)
138140char :: MonadCatch m => Char -> Parser m Char Char
139141char c = Parser.satisfy (== c)
140142
143+--------------------------------------------------------------------------------
144+-- Character sequences
145+--------------------------------------------------------------------------------
146+
147+-- | Drop /zero/ or more white space characters.
148+dropSpace :: MonadCatch m => Parser m Char ()
149+dropSpace = Parser.dropWhile Char.isSpace
150+
151+-- | Drop /one/ or more white space characters.
152+dropSpace1 :: MonadCatch m => Parser m Char ()
153+dropSpace1 = Parser.takeWhile1 Char.isSpace Fold.drain
154+
141155--------------------------------------------------------------------------------
142156-- Numeric parsers
143157--------------------------------------------------------------------------------