libcproject
C static library easier to use than libc (C standard library).
convert.h
Go to the documentation of this file.
1 #ifndef __LIBCPROJECT_CONVERT__
2 #define __LIBCPROJECT_CONVERT__
3 
4 #include <errno.h>
5 #include <stdio.h>
6 #include <stdlib.h>
7 
8 #include "character.h"
9 #include "mathematics.h"
10 #include "stdbool.h"
11 #include "string.h"
12 #include "types.h"
13 
21 string_t convert_character_to_string(const char character);
22 
30 char convert_character_to_digit(const char character);
31 
39 char convert_digit_to_character(const char digit);
40 
48 int64_t convert_string_to_number(const string_t string);
49 
57 string_t convert_number_to_string(const int64_t integer);
58 
67 string_t convert_number_from_base_10_to_base(uint64_t number, uint64_t base);
68 
77 uint64_t convert_number_from_base_to_base_10(string_t number, uint64_t base);
78 
88 string_t convert_number_from_base_to_another(string_t number, uint64_t base_from, uint64_t base_target);
89 
90 #endif
char convert_character_to_digit(const char character)
Convert a character to a digit.
char convert_digit_to_character(const char digit)
Convert a digit to a character.
string_t convert_number_from_base_to_another(string_t number, uint64_t base_from, uint64_t base_target)
Convert a number with a specific base to a number of specific base.
uint64_t convert_number_from_base_to_base_10(string_t number, uint64_t base)
Convert a number with a specific base to a number base 10.
string_t convert_number_from_base_10_to_base(uint64_t number, uint64_t base)
Convert a number (base 10) to a string with a specific base.
string_t convert_number_to_string(const int64_t integer)
Convert a number to a string.
int64_t convert_string_to_number(const string_t string)
Convert a string to a number.
string_t convert_character_to_string(const char character)
Convert a character to a string.
char * string_t
Definition: types.h:8