且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Sprintf中使用变量作为格式字符串?

更新时间:2023-08-21 12:17:46

因此,您实际上需要创建一个具有以下功能类型的StringFormat

So you actually need to create a StringFormat which has a function type as follows

> sprintf (Printf.StringFormat<string->string>("Hello %s")) "World";;
  val it : string = "Hello World"

6.3.16 ,显示了一个示例.