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