HH\Lib\Math\to_base
Requires the Hack Standard Library to be installed.
Facebook Engineer?
This function is available as Math\to_base()
in Facebook's www repository.
Converts the given non-negative number into the given base, using letters a-z
for digits when $to_base
> 10
namespace HH\Lib\Math;
function to_base(
int $number,
int $to_base,
): string;
To base convert a string to an int, see Math\from_base()
.
Parameters
int $number
int $to_base
Returns
string