15 lines
628 B
C
15 lines
628 B
C
#pragma once
|
|
#include <luna/Types.h>
|
|
|
|
// Parse an unsigned integer and advance *str to point to the first non-digit character after the number.
|
|
usize scan_unsigned_integer(const char** str, int base = 10);
|
|
|
|
// Parse a signed integer and advance *str to point to the first non-digit character after the number.
|
|
isize scan_signed_integer(const char** str, int base = 10);
|
|
|
|
// Parse an unsigned integer, similar to strtoull().
|
|
usize parse_unsigned_integer(const char* str, const char** endptr, int base);
|
|
|
|
// Parse a signed integer, similar to strtoll().
|
|
isize parse_signed_integer(const char* str, const char** endptr, int base);
|