haskell - Skipping whitespace excluding newlines in attoparsec -


attoparsec provides function skipspace.

this function consumes whitespace available.

how can implement function skipspacenonewline skips whitespace except \n , \r\n?

note: question intentionally shows no research effort answered q&a-style.

you can combine skipwhile , isendofline (which matches both \n , \r\n).

using lambda function, can combine them skipwhile predicate skips whitespace except newlines.

skipspacenonewline = skipwhile (\x -> isspace_w8 x && not (isendofline x)) 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -