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

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -