module Ethon::Easy::Util
def escape_zero_byte(value)
-
(String, Object)
- Escaped String if
Parameters:
-
value
(Object
) -- The value to escape.
Other tags:
- Example: Escape zero bytes. -
def escape_zero_byte(value) return value unless value.to_s.include?(0.chr) value.to_s.gsub(0.chr, '\\\0') end