Following statemet remove
digits from a string and convert all lower case characters to uppercase.
getUpper list =
[toUpper x | x <- list, not (isDigit x) ]
Prelude> import Data.Char Prelude Data.Char> Prelude Data.Char> let getUpper list = [toUpper x | x <- list, not (isDigit x) ] Prelude Data.Char> Prelude Data.Char> getUpper "Hello ptr123, How are you123" "HELLO PTR, HOW ARE YOU" Prelude Data.Char>
No comments:
Post a Comment