class String

Public Instance Methods

force_encoding(enc) click to toggle source
# File lib/string.rb, line 7
def force_encoding(enc)
  self
end
is_binary_data?() click to toggle source
# File lib/string.rb, line 2
def is_binary_data?
  self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" )
end