23 lines
767 B
Plaintext
23 lines
767 B
Plaintext
DefStr S
|
|
DefInt I
|
|
string1 = "abcdefghijklmnopqrstuvwxyz"
|
|
substring = "klm"
|
|
Dim Achar As String * 1
|
|
Istart = 6
|
|
Ilength = 10
|
|
Achar = "c"
|
|
|
|
' starting from n characters in and of m length;
|
|
Print Mid$(string1, Istart, Ilength)
|
|
' starting from n characters in, up to the end of the string;
|
|
Print Mid$(string1, Istart)
|
|
Print Right$(string1, Len(string1) - Istart + 1)
|
|
' whole string minus the last character;
|
|
Print Left$(string1, Len(string1) - 1)
|
|
Print Mid$(string1, 1, Len(string1) - 1)
|
|
' starting from a known character within the string and of m length;
|
|
Print Mid$(string1, InStr(string1, Achar), Ilength)
|
|
' starting from a known substring within the string and of m length.
|
|
Print Mid$(string1, InStr(string1, substring), Ilength)
|
|
End
|