FastLED 3.9.15
Loading...
Searching...
No Matches

◆ parseInt()

bool fl::anonymous_namespace{http_parser.cpp.hpp}::parseInt ( const fl::string & str,
int & out )

Definition at line 41 of file http_parser.cpp.hpp.

41 {
42 if (str.empty()) return false;
43
44 int value = 0;
45 for (size_t i = 0; i < str.size(); i++) {
46 if (!fl::isdigit(str[i])) {
47 return false;
48 }
49 value = value * 10 + (str[i] - '0');
50 }
51
52 out = value;
53 return true;
54}
bool empty() const FL_NOEXCEPT
fl::size size() const FL_NOEXCEPT
constexpr int type_rank< T >::value
bool isdigit(char c) FL_NOEXCEPT
Check if character is a decimal digit (0-9)
Definition cctype.h:25

References fl::basic_string::empty(), fl::isdigit(), fl::basic_string::size(), and fl::type_rank< T >::value.

+ Here is the call graph for this function: