Sha256: 3baffdeec8659b94f7f818fb484ffbc07fb61b95ec6ff2b159c19da8d37ccf04
Contents?: true
Size: 349 Bytes
Versions: 13
Compression:
Stored size: 349 Bytes
Contents
class Knj::Csv def self.arr_to_csv(arr, del, encl) str = "" first = true arr.each do |val| if first first = false else str << del end val = val.to_s.encode("utf-8").gsub(del, "").gsub(encl, "") str << "#{encl}#{val}#{encl}" end str << "\n" return str end end
Version data entries
13 entries across 13 versions & 1 rubygems