Tipe data yang dihasilkan adalah string.
Formula:
Substring(startIndex As Integer, length As Integer)
startIndex = index posisi awal string akan diambil (dimulai dari 0)
length= panjang karakter yang akan diambil
Contoh:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim strName As String = "Rani Noviani Irsan"
strName = strName.Substring(5, 7)
MsgBox(strName)
End Sub
Click here if you like this article.
0 Comments