diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-01-09 22:05:18 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-01-09 22:05:18 +0100 |
commit | 145458a10b4d1296367039332f0df4219b7a1e8f (patch) | |
tree | 0bb94f5311276436b8981a02290aa6f04d96fa24 /stage3/string.h | |
parent | 8872571a1b9ef6045174cb137ee5999256aa4d24 (diff) | |
download | cuddles-145458a10b4d1296367039332f0df4219b7a1e8f.tar.xz |
add str_parse_dbl
Diffstat (limited to 'stage3/string.h')
-rw-r--r-- | stage3/string.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stage3/string.h b/stage3/string.h index 1a28494..c5ceabe 100644 --- a/stage3/string.h +++ b/stage3/string.h @@ -17,6 +17,10 @@ usize str_find(str s, str tokens); // resulting number is stored in *x usize str_parse_num(str s, u8 base, u64 *x); +// parses a double and returns number of chars processed +// resulting number is stored in *x +usize str_parse_dbl(str s, double *x); + // this is a splitting function // returns the next non-empty substring of *s that is delimited by the tokens in sep // the returned string does not contain any of the separators |