Skip to content

Commit e61d99a

Browse files
committed
+example for str_getcsv
1 parent 21620a5 commit e61d99a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

functions/strings/str_getcsv.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ function str_getcsv(input, delimiter, enclosure, escape) {
33
// original by: Brett Zamir (http://brett-zamir.me)
44
// example 1: str_getcsv('"abc", "def", "ghi"');
55
// returns 1: ['abc', 'def', 'ghi']
6+
// example 2: str_getcsv('"row2""cell1","row2cell2","row2cell3"', null, null, '"');
7+
// returns 2: ['row2"cell1', 'row2cell2', 'row2cell3']
68

79
var output = [];
810
var backwards = function(str) { // We need to go backwards to simulate negative look-behind (don't split on

0 commit comments

Comments
 (0)