Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Substring/True-BASIC/substring.basic
Normal file
15
Task/Substring/True-BASIC/substring.basic
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
LET basestring$ = "abcdefghijklmnopqrstuvwxyz"
|
||||
LET n = 12
|
||||
LET m = 5
|
||||
! starting from n characters in and of m length;
|
||||
PRINT (basestring$)[n:n + m - 1]
|
||||
! starting from n characters in, up to the end of the string;
|
||||
PRINT (basestring$)[n:MAXNUM]
|
||||
! whole string minus last character;
|
||||
PRINT (basestring$)[1:LEN(basestring$) - 1]
|
||||
! starting from a known character within the string and of m length;
|
||||
PRINT (basestring$)[POS(basestring$,"b"):POS(basestring$,"b") + m - 1]
|
||||
! starting from a known subString$ within the string and of m length.
|
||||
LET findstring$ = "pq"
|
||||
PRINT (basestring$)[POS(basestring$,findstring$):POS(basestring$,findstring$) + m - 1]
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue