Marc Sigrist's blog articles

0
comment
on 2/8/2015 11:35 AM
In this post, we are going to test the escaped concact/split functions that we implemented last time. Along the way, it will become apparent why F# is an ideal language for writing .NET unit tests. These are the signatures of the two F# functions to be tested: val concatEscape : esc:char -> sep:string -> strings:seq<string> -> string val splitUnescape : esc:char -> sep:string -> string:string -> seq<string> Seen from C# (e.g., in Visual Studio's object browser), the signatures would look li[...]
>> Read the full article
.
0
comment
on 2/8/2015 11:35 AM
In this post, we are going to test the escaped concact/split functions that we implemented last time. Along the way, it will become apparent why F# is an ideal language for writing .NET unit tests. These are the signatures of the two F# functions to be tested: val concatEscape : esc:char -> sep:string -> strings:seq<string> -> string val splitUnescape : esc:char -> sep:string -> string:string -> seq<string> Seen from C# (e.g., in Visual Studio's object browser), the signatures would look like this: public [...]
>> Read the full article
.
0
comment
on 12/21/2014 6:36 PM
The built-in .NET Join and Split methods for strings do not provide a way for escaping the separator. If the separator is already contained in the input strings before joining, the strings cannot be reproduced by splitting: open System let inputStrings = [| "Hello, world."; "How are you?" |] let separator = ", " let joinedResult = String.Join(separator, inputStrings) let reproducedStrings = joinedResult.Split([| separator |], StringSplitOptions.None) printfn "%A" inputStrings printfn "%A" reproducedStrings[...]
>> Read the full article
.
0
comment
on 12/21/2014 6:36 PM
The built-in .NET Join and Split methods for strings do not provide a way for escaping the separator. If the separator is already contained in the input strings before joining, the strings cannot be reproduced by splitting: open System let inputStrings = [| "Hello, world."; "How are you?" |] let separator = ", " let joinedResult = String.Join(separator, inputStrings) let reproducedStrings = joinedResult.Split([| separator |], StringSplitOptions.None) printfn "%A" inputStrings printfn "%A" reproducedString[...]
>> Read the full article
.
0
comment
on 5/13/2014 3:08 AM
Listen here what the great Luciano Pavarotti has to say about F# ;) (Starts at 3m18s. Some non-desktop browsers will take you to the beginning instead, so you might have to wind forward manually.)
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper