Anonymous user
Strip whitespace from a string/Top and tail: Difference between revisions
Strip whitespace from a string/Top and tail (view source)
Revision as of 12:25, 7 June 2019
, 5 years agoReplaced recursion with expensive 'all' guard for a cleaner and better performing dropWhileEnd
(→{{header|OCaml}}: String.trim since ocaml 4.00.0) |
(Replaced recursion with expensive 'all' guard for a cleaner and better performing dropWhileEnd) |
||
Line 949:
=={{header|Haskell}}==
<lang haskell>import Data.Char (isSpace)
import Data.List (dropWhileEnd)
trimLeft :: String -> String
Line 955 ⟶ 956:
trimRight :: String -> String
trimRight
trim :: String -> String
|