libcproject
C static library easier to use than libc (C standard library).
convert.h File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "character.h"
#include "mathematics.h"
#include "stdbool.h"
#include "string.h"
#include "types.h"
Include dependency graph for convert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

string_t convert_character_to_string (const char character)
 Convert a character to a string. More...
 
char convert_character_to_digit (const char character)
 Convert a character to a digit. More...
 
char convert_digit_to_character (const char digit)
 Convert a digit to a character. More...
 
int64_t convert_string_to_number (const string_t string)
 Convert a string to a number. More...
 
string_t convert_number_to_string (const int64_t integer)
 Convert a number to a string. More...
 
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. More...
 
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. More...
 
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. More...
 

Function Documentation

◆ convert_character_to_string()

string_t convert_character_to_string ( const char  character)

Convert a character to a string.

Parameters
character
Returns
string_t
Since
v1.0.0

◆ convert_character_to_digit()

char convert_character_to_digit ( const char  character)

Convert a character to a digit.

Parameters
character
Returns
char
Since
v1.0.0

◆ convert_digit_to_character()

char convert_digit_to_character ( const char  digit)

Convert a digit to a character.

Parameters
digit
Returns
char
Since
v1.0.0

◆ convert_string_to_number()

int64_t convert_string_to_number ( const string_t  string)

Convert a string to a number.

Parameters
string
Returns
int64_t
Since
v1.0.0

◆ convert_number_to_string()

string_t convert_number_to_string ( const int64_t  integer)

Convert a number to a string.

Parameters
integer
Returns
string_t
Since
v1.0.0

◆ convert_number_from_base_10_to_base()

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.

Parameters
number
base
Returns
string_t
Since
v1.0.0

◆ convert_number_from_base_to_base_10()

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.

Parameters
number
base
Returns
uint64_t
Since
v1.0.0

◆ convert_number_from_base_to_another()

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.

Parameters
number
base_from
base_target
Returns
string_t
Since
v1.0.0