| 1277 | /************************************************************************/ |
| 1278 | |
| 1279 | static int CSVGetFileFieldId(CSVTable *const psTable, const char *pszFieldName) |
| 1280 | |
| 1281 | { |
| 1282 | /* -------------------------------------------------------------------- */ |
| 1283 | /* Find the requested field. */ |
| 1284 | /* -------------------------------------------------------------------- */ |
| 1285 | const int nFieldNameLength = static_cast<int>(strlen(pszFieldName)); |
| 1286 | for (int i = 0; psTable->papszFieldNames != nullptr && |
| 1287 | psTable->papszFieldNames[i] != nullptr; |
| 1288 | i++) |
| 1289 | { |
| 1290 | if (psTable->panFieldNamesLength[i] == nFieldNameLength && |
| 1291 | EQUALN(psTable->papszFieldNames[i], pszFieldName, nFieldNameLength)) |
| 1292 | { |
| 1293 | return i; |
| 1294 | } |
| 1295 | } |
| 1296 | |
| 1297 | return -1; |
| 1298 | } |
| 1299 | |
| 1300 | int CSVGetFileFieldId(const char *pszFilename, const char *pszFieldName) |
| 1301 |
no test coverage detected