function

str_getcsv . string . sncode

VERSIONlatest Parse a CSV string into an array.

STR_GETCSV(1e)

NAME

str_getcsv - Parse a CSV string into an array.

SYNOPSIS

str_getcsv(input,delimiter,enclosure,escape)

PARAMETERS

input
The string to parse.
delimiter
Set the field delimiter. Defaults as a backslash (,).
enclosure
Set the field enclosure character. Defaults as a backslash (").
escape
Set the escape character. Defaults as a backslash (").

RETURN

Returns an indexed array containing the fields read.

EXAMPLES

in:  res=<{str_getcsv("Test,1.5,10,\"test\n\"\n  \"aa\"\" bb\"  ,11")}>.
out: res=[["Test","1.5","10","test\n"],["aa\\"\\" bb","11"]].

AUTHOR

Written by Pusnei Sergey, <sergey@sednove.com>