MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / StringToBool

Method StringToBool

libminifi/src/utils/StringUtils.cpp:28–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace utils {
27
28bool StringUtils::StringToBool(std::string input, bool &output) {
29 std::transform(input.begin(), input.end(), input.begin(), ::tolower);
30 std::istringstream(input) >> std::boolalpha >> output;
31 return output;
32}
33
34utils::optional<bool> StringUtils::toBool(const std::string& str) {
35 std::string trimmed = trim(str);

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected