|
cesium-native 0.52.0
|
Converts from std::string to a bool. More...
#include <CesiumGltf/MetadataConversions.h>
Static Public Member Functions | |
| static std::optional< bool > | convert (const std::string &from) |
| Converts the contents of a std::string to a boolean. | |
| static std::optional< bool > | convert (std::string) |
Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt. | |
Converts from std::string to a bool.
Definition at line 109 of file MetadataConversions.h.
|
inlinestatic |
Converts the contents of a std::string to a boolean.
"0", "false", and "no" (case-insensitive) are converted to false, while "1", "true", and "yes" are converted to true. All other strings will return std::nullopt.
| from | The std::string to convert from. |
Definition at line 120 of file MetadataConversions.h.
|
inlinestatic |
Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.
Definition at line 26 of file MetadataConversions.h.