C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Next: We show the Mid function, which simply returns a Substring of the String based on the positional arguments.
VB.NET program that uses Mid statement, function
Module Module1
    Sub Main()
        ' Input string.
        Dim value As String = "The Dev Codes"
        ' Replace part of string with another string.
        Mid(value, 5, 3) = "Cat"
        ' Write.
        Console.WriteLine(value)
        ' Get middle part of string.
        Dim m As String = Mid(value, 5, 3)
        Console.WriteLine(m)
    End Sub
End Module
Output
Dot Cat Perls
Cat
Function: What about the Mid function? This one is implemented in the obvious way: with the Substring function on the String type.
Substring