Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/elfcat/util.rb

Instance Method Summary collapse

Instance Method Details

#slice_with_index(_start, _end) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/elfcat/util.rb', line 2

def slice_with_index _start, _end
  index = 0
  result = []

  self.slice(_start, _end).each_byte do |b|
    result[index] = b
    index += 1
  end

  return result
end