| 1605 | */ |
| 1606 | |
| 1607 | bool CPLFetchBool(CSLConstList papszStrList, const char *pszKey, bool bDefault) |
| 1608 | |
| 1609 | { |
| 1610 | if (CSLFindString(papszStrList, pszKey) != -1) |
| 1611 | return true; |
| 1612 | |
| 1613 | const char *const pszValue = CSLFetchNameValue(papszStrList, pszKey); |
| 1614 | if (pszValue == nullptr) |
| 1615 | return bDefault; |
| 1616 | |
| 1617 | return CPLTestBool(pszValue); |
| 1618 | } |
| 1619 | |
| 1620 | /********************************************************************** |
| 1621 | * CSLFetchBoolean() |
no test coverage detected