Advertisement
Mysoft

Untitled

Aug 8th, 2020 (edited)
1,849
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dim as string n = "asdfkrisqwerty"
  2. dim as string q = "kris"
  3. for i as integer = 0 to len(n)-len(q)
  4.   print *cptr(zstring ptr,strptr(n)+i)
  5.   for j as integer = 0 to len(q)-1
  6.     if n[i+j] <> q[j] then continue for,for
  7.     print ,"found: "; chr(n[i+j]); " at position:"; i+j
  8.   next j
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement