|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Tiny no-stdlib base-10 number parsers (strtol/strtoul/strtof replacements). More...
Go to the source code of this file.
Functions | |
| bool | det_np_ws (char c) |
| bool | det_np_digit (char c) |
| long | det_strtol (const char *s, const char **end) |
Parse a base-10 long; sets end past the digits (or to s if none). | |
| unsigned long | det_strtoul (const char *s, const char **end) |
Parse a base-10 unsigned long; sets end past the digits (or to s). | |
| void | det_strtod_frac (const char *&p, double &val, bool &any) |
| void | det_strtod_exp (const char *&p, double &val) |
| double | det_strtod (const char *s, const char **end) |
Parse a double (integer[.frac][e[+/-]exp]); sets end (or to s if none). | |
| float | det_strtof (const char *s, const char **end) |
Parse a float (integer[.frac][e[+/-]exp]); sets end (or to s if none). | |
Tiny no-stdlib base-10 number parsers (strtol/strtoul/strtof replacements).
This library does not pull in <stdlib.h> - no heap, no locale, no bloat. These header-only inline helpers parse a base-10 integer / unsigned / float from a string, mirroring the strtol-family endptr contract: skip leading whitespace, accept an optional sign, consume digits, and (optionally) report where parsing stopped. If no digit is converted, *end is set to the original pointer (so callers can detect "no number") and the result is 0.
Definition in file numparse.h.
|
inline |
Definition at line 22 of file numparse.h.
Referenced by det_strtod(), det_strtol(), and det_strtoul().
|
inline |
Definition at line 26 of file numparse.h.
Referenced by det_strtod(), det_strtod_exp(), det_strtod_frac(), det_strtol(), and det_strtoul().
|
inline |
Parse a base-10 long; sets end past the digits (or to s if none).
Definition at line 32 of file numparse.h.
References det_np_digit(), and det_np_ws().
Referenced by json_get_int().
|
inline |
Parse a base-10 unsigned long; sets end past the digits (or to s).
Definition at line 50 of file numparse.h.
References det_np_digit(), and det_np_ws().
|
inline |
|
inline |
|
inline |
Parse a double (integer[.frac][e[+/-]exp]); sets end (or to s if none).
Definition at line 99 of file numparse.h.
References det_np_digit(), det_np_ws(), det_strtod_exp(), and det_strtod_frac().
Referenced by det_strtof().
|
inline |
Parse a float (integer[.frac][e[+/-]exp]); sets end (or to s if none).
Definition at line 124 of file numparse.h.
References det_strtod().