module Ethon::Easy::Util
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/ethon/easy/util.rbs module Ethon::Easy::Util def escape_zero_byte: (String value) -> String end
def escape_zero_byte(value)
Experimental RBS support (using type sampling data from the type_fusion
project).
def escape_zero_byte: (String value) -> String
This signature was generated using 192 samples from 5 applications.
-
(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