example/public/ueditor/third-party/highcharts/modules/data.src.js
function () {
		var self = this,
			options = this.options,
			csv = options.csv,
			columns = this.columns,
			startRow = options.startRow || 0,
			endRow = options.endRow || Number.MAX_VALUE,
			startColumn = options.startColumn || 0,
			endColumn = options.endColumn || Number.MAX_VALUE,
			lines,
			activeRowNo = 0;
			
		if (csv) {
			
			lines = csv
				.replace(/\r\n/g, "\n") // Unix
				.replace(/\r/g, "\n") // Mac
				.split(options.lineDelimiter || "\n");
			
			each(lines, function (line, rowNo) {
				var trimmed = self.trim(line),
					isComment = trimmed.indexOf('#') === 0,
					isBlank = trimmed === '',
					items;
				
				if (rowNo >= startRow && rowNo <= endRow && !isComment && !isBlank) {
					items = line.split(options.itemDelimiter || ',');
					each(items, function (item, colNo) {
						if (colNo >= startColumn && colNo <= endColumn) {
							if (!columns[colNo - startColumn]) {
								columns[colNo - startColumn] = [];					
							}
							
							columns[colNo - startColumn][activeRowNo] = item;
						}
					});
					activeRowNo += 1;
				}
			});

			this.dataFound();
		}
	}
function () {
		var self = this,
			options = this.options,
			csv = options.csv,
			columns = this.columns,
			startRow = options.startRow || 0,
			endRow = options.endRow || Number.MAX_VALUE,
			startColumn = options.startColumn || 0,
			endColumn = options.endColumn || Number.MAX_VALUE,
			lines,
			activeRowNo = 0;
			
		if (csv) {
			
			lines = csv
				.replace(/\r\n/g, "\n") // Unix
				.replace(/\r/g, "\n") // Mac
				.split(options.lineDelimiter || "\n");
			
			each(lines, function (line, rowNo) {
				var trimmed = self.trim(line),
					isComment = trimmed.indexOf('#') === 0,
					isBlank = trimmed === '',
					items;
				
				if (rowNo >= startRow && rowNo <= endRow && !isComment && !isBlank) {
					items = line.split(options.itemDelimiter || ',');
					each(items, function (item, colNo) {
						if (colNo >= startColumn && colNo <= endColumn) {
							if (!columns[colNo - startColumn]) {
								columns[colNo - startColumn] = [];					
							}
							
							columns[colNo - startColumn][activeRowNo] = item;
						}
					});
					activeRowNo += 1;
				}
			});

			this.dataFound();
		}
	}
function ( ) { var self = this , options = this . options , csv = options . csv , columns = this . columns , startRow = options . startRow || 0 , endRow = options . endRow || Number . MAX_VALUE , startColumn = options . startColumn || 0 , endColumn = options . endColumn || Number . MAX_VALUE , lines , activeRowNo = 0 ; if ( csv ) { lines = csv . replace ( / \r\n / g , "\n" ) // Unix . replace ( / \r / g , "\n" ) // Mac . split ( options . lineDelimiter || "\n" ) ; each ( lines , function ( line , rowNo ) { var trimmed = self . trim ( line ) , isComment = trimmed . indexOf ( '#' ) === 0 , isBlank = trimmed === '' , items ; if ( rowNo >= startRow && rowNo <= endRow && ! isComment && ! isBlank ) { items = line . split ( options . itemDelimiter || ',' ) ; each ( items , function ( item , colNo ) { if ( colNo >= startColumn && colNo <= endColumn ) { if ( ! columns [ colNo - startColumn ] ) { columns [ colNo - startColumn ] = [ ] ; } columns [ colNo - startColumn ] [ activeRowNo ] = item ; } } ) ; activeRowNo += 1 ; } } ) ; this . dataFound ( ) ; } }
Parse a CSV input string
Parse a CSV input string