added iniAsBool
This commit is contained in:
parent
1f597c0220
commit
a08fc40eba
2 changed files with 6 additions and 0 deletions
|
|
@ -146,6 +146,11 @@ double iniAsNum(const inivalue_t *value) {
|
|||
return val;
|
||||
}
|
||||
|
||||
bool iniAsBool(const inivalue_t *value) {
|
||||
if (!value) return false;
|
||||
return strvCompare(value->value, strvInit("true")) == 0;
|
||||
}
|
||||
|
||||
// == INI WRITER ========================================================================
|
||||
|
||||
#include "strstream.h"
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ vec(strview_t) iniAsArrayU8(const inivalue_t *value, const char *delim);
|
|||
uint64 iniAsUInt(const inivalue_t *value);
|
||||
int64 iniAsInt(const inivalue_t *value);
|
||||
double iniAsNum(const inivalue_t *value);
|
||||
bool iniAsBool(const inivalue_t *value);
|
||||
|
||||
// == INI WRITER ========================================================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue