FreeCalypso > hg > themwi-nanp
diff include/number_utils.h @ 0:159dd90eeafe
beginning, libnumutil compiles
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 12 Dec 2023 23:52:50 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/number_utils.h Tue Dec 12 23:52:50 2023 +0000 @@ -0,0 +1,17 @@ +/* + * This header file provides function prototype declarations + * for phone-number-related utility functions. + */ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +uint16_t digits3_to_uint16(const char *numstr); +uint16_t digits4_to_uint16(const char *numstr); + +bool is_nanp_valid_prefix(const char *numstr); + +int grok_number_string(const char *str, bool allow_hyphen); +void dehyphen_number_string(const char *src, char *dest);