Convert a list of characters (or array) to a string

前端 未结 4 725
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 03:57

how does one convert from a list of characters to a string?

To put it another way, how do I reverse List.ofSeq \"abcd\"?

UPDATE: new System.St

4条回答
  •  粉色の甜心
    2021-02-07 04:17

    Just faced similar problem, and came up with this solutions:

    List.fold (fun str x -> str + x.ToString()) "" (List.ofSeq "abcd") 
    

提交回复
热议问题