module Ethon::Easies::Util

def self.escape_zero_byte(value)

Returns:
  • (String, Object) - Escaped String if

Parameters:
  • value (Object) -- The value to escape.

Other tags:
    Example: Escape zero bytes. -
def self.escape_zero_byte(value)
  return value unless value.to_s.include?(0.chr)
  value.to_s.gsub(0.chr, '\\\0')
end