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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

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

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