File: UsingAutoDetection.groovy

package info (click to toggle)
groovycsv 1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 172 kB
  • sloc: xml: 58; makefile: 7
file content (10 lines) | stat: -rw-r--r-- 213 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
import com.xlson.groovycsv.CsvParser

def csv = '''Name:Lastname
Mark:Andersson
Pete:Hansen'''

def data = new CsvParser().parse(csv, autoDetect:true)
for(line in data) {
    println "$line.Name $line.Lastname"
}