Empty string: Difference between revisions

Added F# version
No edit summary
(Added F# version)
Line 296:
-- string is not empty
end if</lang>
 
 
=={{header|F_Sharp|F#}}==
<lang fsharp>open System
 
[<EntryPoint>]
let main args =
let emptyString = String.Empty // or any of the literals "" @"" """"""
printfn "Is empty %A: %A" emptyString (emptyString = String.Empty)
printfn "Is not empty %A: %A" emptyString (emptyString <> String.Empty)
0</lang>
Output
<pre>Is empty "": true
Is not empty "": false</pre>
 
=={{header|Fantom}}==
Anonymous user