View difference between Paste ID: 2ygJ7sRw and 5dnXsuFE
SHOW: | | - or go back to the newest paste.
1-
  dim as string n(14) = {"asdfkrisqwerty"}
1+
dim as string n = "asdfkrisqwerty"
2-
  dim as string q(4) = {"kris"}
2+
dim as string q = "kris"
3-
    for i as integer = 0 to 13
3+
for i as integer = 0 to len(n)-len(q)
4-
      for j as integer = 0 to 3
4+
  print *cptr(zstring ptr,strptr(n)+i)
5-
        if n(i) = q(j) then
5+
  for j as integer = 0 to len(q)-1
6-
          print "found: ", n(j), "at position: ", i, "in: ", n(i)
6+
    if n[i+j] <> q[j] then continue for,for
7-
        end if
7+
    print ,"found: "; chr(n[i+j]); " at position:"; i+j
8-
    next
8+
  next j
9-
  next
9+
  print
10
  print ,"found ";q;" at position:"; i
11
  print ,left$(n,i);"[";q;"]";mid$(n,i+len(q)+1)
12
  exit for  
13
next i
14
sleep
15