Luna/luna/include/luna/NumberParsing.h
2023-01-02 13:07:29 +01:00

15 lines
598 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);
// 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);
// 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);