Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Substring/QB64/substring.qb64
Normal file
22
Task/Substring/QB64/substring.qb64
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue