How Do I Use A Variable As The Formatting String With Sprintf?
I feel like a total noob for having to ask this but it's got me stumped. I set a format string like this: let fs = "This is my format test %s" Then I attempt to use it like so: let s = sprintf fs "testing" When I do so I get this error: //stdin(26,17): error FS0001: The type 'string' is not compatible with the type 'Printf.StringFormat<('a -> 'b)>' So I then tried this: let s = sprintf (Printf.StringFormat fs) "test" to which the REPL responded: //stdin(28,18): error FS1124: Multiple types exist called 'StringFormat', taking different numbers of generic parameters. Provide a type instantiation