Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の C# スニペットに相当する F# を見つけようとしています
string.Format("A: {0} B: {1} A again: {0} C: {2}", a, b, c);
私はこれを行うことができます:
sprintf "A: %s B: %s A again: %s C: %s" a b a c
ただし、C# の例のように a プロパティを 2 回参照する方法はあるのでしょうか。
ありがとう
幸いなことString.Formatに、F# ではまだ機能します。
String.Format
> open System;; > String.Format("Hello {0} {0}", "world");; val it : string = "Hello world world"