class String def remove_whitespace self.gsub(" ","") end def is_i? !!(self =~ /^[-+]?[0-9]([0-9]*)?$/) end def to_utf16le Iconv.conv('utf-16le', 'UTF-8', self) end end