2022-11-19 11:30:36 +00:00
|
|
|
#pragma once
|
2022-12-04 11:42:43 +00:00
|
|
|
#include <luna/Types.h>
|
2022-11-19 11:30:36 +00:00
|
|
|
|
2022-12-17 14:00:19 +00:00
|
|
|
// Parse an unsigned integer and advance *str to point to the first non-digit character after the number.
|
2023-06-18 22:58:02 +00:00
|
|
|
usize scan_unsigned_integer(const char** str, int base = 10);
|
2022-12-17 14:00:19 +00:00
|
|
|
|
|
|
|
// Parse a signed integer and advance *str to point to the first non-digit character after the number.
|
2023-06-18 22:58:02 +00:00
|
|
|
isize scan_signed_integer(const char** str, int base = 10);
|
2022-12-17 14:00:19 +00:00
|
|
|
|
|
|
|
// Parse an unsigned integer, similar to strtoull().
|
2022-12-17 11:12:58 +00:00
|
|
|
usize parse_unsigned_integer(const char* str, const char** endptr, int base);
|
2022-12-17 14:00:19 +00:00
|
|
|
|
|
|
|
// Parse a signed integer, similar to strtoll().
|
2023-01-02 12:07:29 +00:00
|
|
|
isize parse_signed_integer(const char* str, const char** endptr, int base);
|