Class: String

Inherits:
Object show all
Defined in:
lib/nicolus.rb

Instance Method Summary collapse

Instance Method Details

#nicolus_splitObject



17
18
19
# File 'lib/nicolus.rb', line 17

def nicolus_split
  self.chomp.gsub("\t", ',').split(',')
end

#unquote!Object



21
22
23
24
25
26
27
# File 'lib/nicolus.rb', line 21

def unquote!
  # remove first
  unless (gsub!(/\A\"/, '').nil?)
    # remove last
    gsub!(/\"$/, '')
  end
end

#utf16_to_isoObject



12
13
14
15
# File 'lib/nicolus.rb', line 12

def utf16_to_iso
  converter = Iconv.new('ISO-8859-1//IGNORE//TRANSLIT', 'UTF-16')
  converter.iconv(self)
end