Strip control codes and extended characters from a string: Difference between revisions
Strip control codes and extended characters from a string (view source)
Revision as of 19:23, 1 May 2019
, 5 years ago→{{header|Haskell}}: Reduced the expression in terms of a liftA2 composition over two other functions.
(→{{header|OCaml}}: updated for recent ocaml versions with new type bytes) |
(→{{header|Haskell}}: Reduced the expression in terms of a liftA2 composition over two other functions.) |
||
Line 876:
=={{header|Haskell}}==
<lang Haskell>
strip :: String -> String
strip = filter (liftA2 (&&) (> 31) (< 126) . fromEnum)
main :: IO ()
|