當字串長度是固定的時候,取出時可指定位置,Substring是由0開始
Sample:
Dim stringReader As String = "ABCDEFG"
Dim StrtNO As String = stringReader.Substring(2, 3)
Result:
StrtNO ="CDE"
當字串長度是不固定時,從右側取出指定位數
Sample:
Dim stringReader As String = "ABCDEFG"
Dim StrtNO As String = stringReader.Substring(stringReader .Length - 3)
Result:
StrtNO = "EFG"