daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ident Explode Function
  2.  
  3. method main
  4.     *Set Variables
  5.     var explode_char ,
  6.     var explode_string cool,story,brah
  7.    
  8.     *Explode String
  9.     exec explode
  10.    
  11.     *Write Array
  12.     array.length array_length $explode_array
  13.     var i 1
  14.     while $i ! $array_length
  15.         array.get tmp_var explode_array $i
  16.         io.write tmp_var
  17.         math.calc i $i + 1
  18.     endwhile
  19. end
  20.  
  21. method explode
  22.     var explode_string2 $explode_string && $explode_char
  23.     array.create explode_array
  24.     string.length string_length $explode_string2
  25.     var i 1
  26.     while $i ! $string_length
  27.         string.char tmp_char $i $explode_string2
  28.         var tmp_string
  29.         if $tmp_char ! $explode_char
  30.             var tmp_string $tmp_string && $tmp_char
  31.         endif
  32.         if $tmp_char = $explode_char
  33.             array.add explode_array $tmp_string
  34.             var tmp_string
  35.         endif
  36.         math.calc i $i + 1
  37.     endwhile
  38. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top