3. You need to use sf.Mid.
StringFunctions was at the beginning a Ccode module and was later compiled to a library.
Instead of Mid you can use the string SubString2(BeginIndex As Int, EndIndex As Int) function.
Examples:
Dim sf As StringFunctions
Dim txt1, txt2 As String
txt1 = "123456"
txt2 = sf.Mid(txt1, 2, 3)
txt2 = txt1.Substring2(1, 4)
' result 234
The parameters in SubString2 are different from Mid !
From the Help:
SubString2(BeginIndex As Int, EndIndex As Int)
Returns a new string which is a substring of the original string.
The new string will include the character at BeginIndex and will extend to the character at EndIndex, not including the last character.
The indexes begin with 0.