1 function explode ( _str,seperator )
2 local pos, arr = 0, {}
3 for st, sp in function() return string.find( _str, seperator, pos, true ) end do
4 table.insert( arr, string.sub( _str, pos, st-1 ) )
5 pos = sp + 1
6 end
7 table.insert( arr, string.sub( _str, pos ) )
8 return arr
9 end
/tmp/jit.log:
[TRACE --- imgresize.lua:1 -- NYI: bytecode 51 at imgresize.lua:3]
[TRACE --- imgresize.lua:3 -- leaving loop in root trace]
[TRACE --- imgresize.lua:1 -- NYI: bytecode 51 at imgresize.lua:9]
[TRACE --- imgresize.lua:1 -- NYI: bytecode 51 at imgresize.lua:3]
[TRACE --- imgresize.lua:1 -- NYI: bytecode 51 at imgresize.lua:9]
[TRACE --- imgresize.lua:3 -- leaving loop in root trace]