@@ -5,21 +5,22 @@ function str_getcsv(input, delimiter, enclosure, escape) {
5
5
// returns 1: ['abc', 'def', 'ghi']
6
6
// example 2: str_getcsv('"row2""cell1","row2cell2","row2cell3"', null, null, '"');
7
7
// returns 2: ['row2"cell1', 'row2cell2', 'row2cell3']
8
- /*
8
+
9
9
// These test cases allowing for missing delimiters are not currently supported
10
- str_getcsv('"row2""cell1",row2cell2,row2cell3', null, null, '"');
11
- ['row2"cell1', 'row2cell2', 'row2cell3']
10
+ /*
11
+ str_getcsv('"row2""cell1",row2cell2,row2cell3', null, null, '"');
12
+ ['row2"cell1', 'row2cell2', 'row2cell3']
12
13
13
- str_getcsv('row1cell1,"row1,cell2",row1cell3', null, null, '"');
14
- ['row1cell1', 'row1,cell2', 'row1cell3']
14
+ str_getcsv('row1cell1,"row1,cell2",row1cell3', null, null, '"');
15
+ ['row1cell1', 'row1,cell2', 'row1cell3']
15
16
16
- str_getcsv('"row2""cell1",row2cell2,"row2""""cell3"'
17
- ['row2"cell1', 'row2cell2', 'row2""cell3']
17
+ str_getcsv('"row2""cell1",row2cell2,"row2""""cell3"'
18
+ ['row2"cell1', 'row2cell2', 'row2""cell3']
18
19
19
- str_getcsv('row1cell1,"row1,cell2","row1"",""cell3"', null, null, '"');
20
- ['row1cell1', 'row1,cell2', 'row1","cell3'];
20
+ // str_getcsv('row1cell1,"row1,cell2","row1"",""cell3"', null, null, '"');
21
+ ['row1cell1', 'row1,cell2', 'row1","cell3'];
21
22
22
- Should also test newlines within
23
+ Should also test newlines within
23
24
*/
24
25
var i , inpLen , output = [ ] ;
25
26
var backwards = function ( str ) { // We need to go backwards to simulate negative look-behind (don't split on
0 commit comments