Class Index | File Index

Classes


Class CeL.data.CSV

CSV data 的 functions
Defined in: CSV.origin.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
null module constructor
Method Summary
Method Attributes Method Name and Description
<static>  
CeL.data.CSV.parse_CSV(_t, doCheck, hasTitle)
parse CSV data to JSON 讀入 CSV 檔
Class Detail
CeL.data.CSV()
null module constructor
Method Detail
<static> {Array} CeL.data.CSV.parse_CSV(_t, doCheck, hasTitle)
parse CSV data to JSON 讀入 CSV 檔
//	to use:
var data=parse_CSV('~');
data[_line_][_field_]

//	hasTitle:
var data = parse_CSV('~',0,1);
//data[_line_][data.t[_title_]]

//	then:
data.tA	=	title line
data.t[_field_name_]	=	field number of title
data.it	=	ignored title array
data[num]	=	the num-th line (num: 0,1,2,..)
Parameters:
{String} _t
CSV text data
{Boolean} doCheck
check if data is valid
{Boolean} hasTitle
there's a title line
Returns:
{Array} [ [L1_1,L1_2,..], [L2_1,L2_2,..],.. ]
See:
JSDB: JavaScript for databases, John Hax: A lesson of RegExp: 50x faster with just one line patch

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Aug 20 2011 15:07:30 GMT+0800 (CST)