Renamed base-helpers to numeric_base, and separated numeric_base into header and implementation files
parent
a47e598b5c
commit
13da015683
@ -0,0 +1,14 @@
|
||||
#ifndef _BASE_HELP
|
||||
#define _BASE_HELP
|
||||
#include <string>
|
||||
|
||||
/* Convert the given value from the given base, to base 10 */
|
||||
int to_decimal(std::string num, int from_base);
|
||||
|
||||
/* Convert the given value from base 10 to the given base */
|
||||
std::string from_decimal(int num, int to_base);
|
||||
|
||||
/* Convert the given value from 'from_base', to 'to_base' */
|
||||
std::string base_convert(std::string num, int from_base, int to_base);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue