Advertisement
Mysoft

Untitled

Apr 11th, 2024
1,436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sub strrev(target as string)
  2.   dim char as ubyte
  3.   dim as long iEnd = len(target)-1
  4.   for i as integer = 0 to iEnd\2
  5.     char = target[i]
  6.     target[i] = target[iEnd]
  7.     target[iEnd] = char
  8.     iEnd -= 1
  9.   next
  10. end sub
  11.  
  12. ' OR ... '
  13.  
  14. sub strrev(target as string)
  15.   dim char as ubyte
  16.   dim as long iEnd = len(target)-1
  17.   for i as integer = 0 to iEnd\2
  18.     swap target[i],target[iEnd]
  19.     iEnd -= 1
  20.   next
  21. end sub
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement