Skip to content

Commit 8c6ec2c

Browse files
committed
add another todo example
1 parent f6fcac1 commit 8c6ec2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

functions/strings/str_getcsv.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function str_getcsv(input, delimiter, enclosure, escape) {
22
// discuss at: http://phpjs.org/functions/str_getcsv/
33
// original by: Brett Zamir (http://brett-zamir.me)
4-
// example 1: str_getcsv('"abc", "def", "ghi"');
4+
// example 1: str_getcsv('"abc","def","ghi"');
55
// returns 1: ['abc', 'def', 'ghi']
66
// example 2: str_getcsv('"row2""cell1","row2cell2","row2cell3"', null, null, '"');
77
// returns 2: ['row2"cell1', 'row2cell2', 'row2cell3']
@@ -13,6 +13,8 @@ example 4: str_getcsv('row1cell1,"row1,cell2",row1cell3', null, null, '"');
1313
returns 4: ['row1cell1', 'row1,cell2', 'row1cell3']
1414
example 5: str_getcsv('"row2""cell1",row2cell2,"row2""""cell3"'
1515
returns 5: ['row2"cell1', 'row2cell2', 'row2""cell3']
16+
example 6: str_getcsv('row1cell1,"row1,cell2","row1"",""cell3"', null, null, '"');
17+
returns 6: ['row1cell1', 'row1,cell2', 'row1","cell3'];
1618
*/
1719
var i, inpLen, output = [];
1820
var backwards = function(str) { // We need to go backwards to simulate negative look-behind (don't split on

0 commit comments

Comments
 (0)