Method: String#getbyte

Defined in:
lib/helpers/hexdump.rb,
lib/helpers/ruby_1.8_1.9_compatibility.rb

#getbyte(x) ⇒ Object

when accessing a string and selecting x-th byte to do calculations , as defined in Ruby 1.9



38
39
40
# File 'lib/helpers/hexdump.rb', line 38

def getbyte(x)   # when accessing a string and selecting x-th byte to do calculations , as defined in Ruby 1.9                                         
  self[x]  # returns an integer                                                                                                                        
end