lab3/labq3_utility.rb
# reads a CSV file and returns an array of strings - each line in the CSV file as one string
reads a CSV file and returns an array of strings - each line in the CSV file as one string
reads a CSV file and returns an array of strings - each line in the CSV file as one string
def read_file(file)
	lines = IO.readlines(file)
	if lines != nil
		for i in 0 .. lines.length-1
			lines[i] = lines[i].sub("\n","")
		end
		return lines[0..lines.length-1]
	end
	return nil
end
def read_file ( file ) lines = IO . readlines ( file ) if lines != nil for i in 0 .. lines . length - 1 lines [ i ] = lines [ i ] . sub ( "\n" , "" ) end return lines [ 0 .. lines . length - 1 ] end return nil end
reads a CSV file and returns an array of strings - each line in the CSV file as one string
reads a CSV file and returns an array of strings - each line in the CSV file as one string
file