[prev] [index] [next]

CSV Library Interface (cont)

char *csvfield(int n)
  • fields are numbered from 0 to K
  • returns n-th field from last line read by csvgetline
  • returns NULL if n < 0 or (n > K)
  • fields conform to definition given earlier
  • there can be an arbitray number of fields of any length
  • returns NULL if memory capacity exceeded in processing fields
  • field must be treated as read-only storage
  • behaviour undefined if called before csvgetline called