【发布时间】:2013-02-25 10:55:57
【问题描述】:
我的问题是,如果我输入一个包含 Hello, today is a Nice Day!! 之类的字符串,我怎样才能去掉空格和标点符号,并将大写字母替换为小写字母?
我知道如何删除它们,但不知道如何替换它们。
还要去掉标点符号。
对不起,我不知道如何处理字符串,只有数字。
testList xs = [if x = [,|.|?|!] then " " | x<-xs]
【问题讨论】:
标签: string list haskell list-comprehension