Fsharp: Triple quote string (verbatim)

By Xah Lee. Date: .

Triple Quoted string (Real Verbatim)

// triple quoted string example
let xx =  """some thing"""
printfn "%s" xx
// some thing
// backslash has no special meaning
let xx =  """some\nthing"""
printfn "%s" xx
// some\nthing
// backslash at end of line, no special meaning
let xx = """aa\
   bb"""
printfn "%s" xx
(*
aa\
   bb
 *)
// triple quoted string, example of multiple lines
let xx =  """some thing
in the water"""
printfn "%s" xx
(*
some thing
in the water
*)

Fsharp, String