From 145458a10b4d1296367039332f0df4219b7a1e8f Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Tue, 9 Jan 2024 22:05:18 +0100 Subject: add str_parse_dbl --- stage3/string.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stage3/string.h') 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 -- cgit v1.2.3