trimmer des deux côtés

This commit is contained in:
Jephté Clain 2014-01-21 12:21:02 +04:00
parent 284db6fa5b
commit ae4be5fc1f
1 changed files with 4 additions and 1 deletions

View File

@ -829,7 +829,10 @@ NR <= skip_lines { next }
$0 = ""
for (i = 1; i <= headers_count; i++) {
value = substr(line, starts[i], sizes[i])
if (trim_values) sub(/ *$/, "", value)
if (trim_values) {
sub(/^ */, "", value)
sub(/ *$/, "", value)
}
$i = value
}
formatcsv()