8 lines
130 B
Ruby
8 lines
130 B
Ruby
module Utils
|
|
def self.binary?(string)
|
|
string.each_byte do |x|
|
|
x.nonzero? or return true
|
|
end
|
|
false
|
|
end
|
|
end
|