Creating substrings in F#
February 18, 2017 Leave a comment
Reading a chunk of a string into another string is based on the position of the characters in the string. The characters in the string form an array of chars and we can read parts of it by referring to the required array positions of the characters. This is no different from popular OOP languages like C# and Java. The only difference is the syntax.
Let’s start with the following string:
let longString = "The message couples the distressed heat before a purchase."
The random sentence generator site has a lot of similar meaningless sentences for testing.
The most simplistic application of substrings is to read one character:¨