How to split a string in Haskell?

后端 未结 13 1574
日久生厌
日久生厌 2020-11-28 03:08

Is there a standard way to split a string in Haskell?

lines and words work great from splitting on a space or newline, but surely there is

13条回答
  •  一生所求
    2020-11-28 03:54

    Example in the ghci:

    >  import qualified Text.Regex as R
    >  R.splitRegex (R.mkRegex "x") "2x3x777"
    >  ["2","3","777"]
    

提交回复
热议问题