FastLED 3.10.8
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_NO_EXCEPT
fl::size size() const FL_NO_EXCEPT
constexpr int type_rank< T >::value
bool isdigit(char c) FL_NO_EXCEPT
Check if character is a decimal digit (0-9)
Definition cctype.h:25

References fl::FL_NO_EXCEPT, fl::isdigit(), and fl::type_rank< T >::value.

+ Here is the call graph for this function: