Method: MessageTranslator#string_from_bytes
- Defined in:
- lib/telegrams/commands/message_translator.rb
#string_from_bytes(bytes) ⇒ Object
10 11 12 13 14 |
# File 'lib/telegrams/commands/message_translator.rb', line 10 def string_from_bytes(bytes) # convert from ASCIIZ (null-terminated ascii), removing all the # trailing null characters bytes.pack("C*").strip end |