diff options
author | Christian Schneider | 2021-01-13 16:17:00 +0100 |
---|---|---|
committer | Christian Schneider | 2021-01-13 16:17:00 +0100 |
commit | b1548c21528cc8158f09a3acaf6fb8ef51ae7e5f (patch) | |
tree | 988c7a16faa3491d83f069722c16e5cb3275d113 /it_pipe.class | |
parent | 81e5fda87626dfe94d46be511ebc546076b1975b (diff) | |
download | itools-b1548c21528cc8158f09a3acaf6fb8ef51ae7e5f.tar.gz itools-b1548c21528cc8158f09a3acaf6fb8ef51ae7e5f.tar.bz2 itools-b1548c21528cc8158f09a3acaf6fb8ef51ae7e5f.zip |
Unified comment style
Diffstat (limited to 'it_pipe.class')
-rw-r--r-- | it_pipe.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_pipe.class b/it_pipe.class index a2588fe..967cc77 100644 --- a/it_pipe.class +++ b/it_pipe.class @@ -203,7 +203,7 @@ function csv($p = []) $p = is_string($p) ? ['forceschema' => $p] : $p; $counts = count_chars($this->lines[0]); $splitchar = $counts[ord("\t")] ? "\t" : ($counts[ord(";")] > $counts[ord(",")] ? ";" : ","); - $csvhead = it::replace(['^\x{FEFF}' => ''], array_shift($this->lines)); // it::replace removes utf8 byte order mark + $csvhead = it::replace(['^\x{FEFF}' => ''], array_shift($this->lines)); # it::replace removes utf8 byte order mark $schema = $p['forceschema'] ? explode(",", $p['forceschema']) : str_getcsv(trim($csvhead, "#\n "), $splitchar, '"'); # should function_exists('str_getcsv') foreach ($schema as $idx => $col) $schema[$idx] = it::replace(['^$' => "field$idx", '\W' => $p['fixcolnames'] ? "_" : '$0'], $col); |