Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Multisplit/Yabasic/multisplit.basic
Normal file
19
Task/Multisplit/Yabasic/multisplit.basic
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
t$ = "a!===b=!=c"
|
||||
s$ = "==,!=,="
|
||||
|
||||
dim n$(1)
|
||||
|
||||
n = token(s$, n$(), ",")
|
||||
dim p(n)
|
||||
|
||||
do
|
||||
l = len(t$)
|
||||
j = 0
|
||||
for i = 1 to n
|
||||
p(i) = instr(t$, n$(i))
|
||||
if p(i) and p(i) < l then l = p(i) : j = i end if
|
||||
next
|
||||
if not j print t$ : break
|
||||
print left$(t$, l - 1), " with separator ", n$(j)
|
||||
t$ = right$(t$, len(t$) - (l + len(n$(j))) + 1)
|
||||
loop
|
||||
Loading…
Add table
Add a link
Reference in a new issue