VB
txt = Mid(Text As String, BeginIndex As Int, Length As Int)
String index begins with 1.
B4A / B4i
txt = Text.SubString(BeginIndex As Int, EndIndex As Int)
BeginIndex inclusive, EndIndex exclusive.
String indexes begins with 0.
Examples:
VB
Dim Text1, Text2 as String
Text1 = "0123456789"
Text2 = Mid(Test1, 3, 3) ' Result 234
B4A / B4i
Dim Text1, Text2 as String
Text1 = "0123456789"
Text2 = Text1.SubString(2, 5) ' Result 234
When I learn a new language I adapt to the language and don't try to adapt the language to me

.
EDIT 2014.11.30:
Modified the VB example after the remark in the next post.
Mid(Test1, 2, 3) > Mid(Test1, 3, 3)
Added the String index values.