这种要求的字符串如何截取?老师下面这段代码是截取字符串中的前4个字符,现在我需要截取前4个字符后面的部分,后面的字符没有固定长度,这个代码如何修改?
If e.DataCol.Name = "院校名称" Then
Dim s As String = e.DataRow("院校名称")
Dim V As Short = "4"
If e.DataRow.IsNull("院校名称") OrElse e.DataRow.IsNull("院校名称") Then
e.DataRow("院校编号") = Nothing
Else
If v > 0 Then
e.DataRow("院校编号") = left(s,v)
Else
e.DataRow("院校编号") = right(s,v*-1)
End If
End If
End If
谢谢老师