I've just learned how to count the number of chars in a string using length nameoflist and I'm wondering if it's possible to count the number of chars without spaces/punctuation?

Any help is appreciated,thanks

有帮助吗?

解决方案

import Data.Char

length $ filter isAlphaNum nameoflist
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top