1- MasterOfFoo
2- ===========
1+ # MasterOfFoo
32
43![ "f" Logo] ( https://raw.githubusercontent.com/vbfox/MasterOfFoo/master/src/BlackFox.MasterOfFoo/Icon.png )
54
@@ -13,8 +12,7 @@ The code is essentially an extracted version of [`printf.fs`][printf_fs] where t
1312what to do with the final blocks that compose the string (printf put them on the console, sprintf in a buffer, ...)
1413but also what to do with the parameters passed for each format specifier.
1514
16- Sample usage
17- ------------
15+ ## Sample usage
1816
1917``` fsharp
2018module MyModule =
@@ -33,8 +31,7 @@ module MyModule =
3331MyModule.mysprintf "Hello %s." "World"
3432```
3533
36- Mini-Doc
37- --------
34+ ## Mini-Doc
3835
3936### PrintableElement
4037
@@ -70,8 +67,7 @@ Members:
7067* ` doPrintfFromEnv ` : Take a format and a ` PrintfEnv ` to create a printf-like function
7168* ` doPrintf ` : Same as ` doPrintfFromEnv ` but allow to know the number of elements when the ` PrintfEnv ` is created.
7269
73- FAQ
74- ---
70+ ## FAQ
7571
7672### What does it allow exactly that can't be done with the original set of functions ?
7773
@@ -102,12 +98,22 @@ value.
10298val it : (int -> int -> float -> string) = <fun:it@1>
10399````
104100
105- Projects using it
106- -----------------
101+ ### How are interpolated strings represented ?
102+
103+ The details of string interpolation internals are specified in [ F# RFC FS-1001 - String Interpolation] [ fs-1001 ] .
104+
105+ They appear as follow in this library:
106+ * Type-checked "printf-style" fills behave exactly as they do in ` sprintf ` and friends.
107+ * Unchecked ".NET-style" fills appear with a ` Specifier.TypeChar ` of 'P' and the .NET format string
108+ in ` Specifier.InteropHoleDotNetFormat ` .
109+
110+ [ fs-1001 ] : https://github.com/fsharp/fslang-design/blob/aca88da13cdb95f4f337d4f7d44cbf9d343704ae/FSharp-5.0/FS-1001-StringInterpolation.md#f-rfc-fs-1001---string-interpolation
111+
112+ ## Projects using it
107113
108114* [ ColoredPrintf] [ colorprintf ] : A small library that I created to add colored parts to printf strings.
109115
110- * If you use it somewhere, ping me on twitter [ @ virtualblackfox ] [ twitter ] so I can add you.*
116+ * If you use it somewhere, ping me on the fediverse [ @ vbfox @hachyderm.io ] [ fedi ] so I can add you.*
111117
112118More fun ?
113119----------
@@ -142,5 +148,5 @@ ColorPrintf.colorprintf "%s est %t" "La vie" (fun _ -> "belle !")
142148```
143149
144150[ printf_fs ] : https://github.com/fsharp/fsharp/blob/master/src/fsharp/FSharp.Core/printf.fs
145- [ twitter ] : https://twitter.com/virtualblackfox
151+ [ fedi ] : https://hachyderm.io/@vbfox
146152[ colorprintf ] : https://github.com/vbfox/ColoredPrintf
0 commit comments