Files
nixpkgs/lib
Bas van Dijk 00022fbeda lib: add the toHex and toBase utility functions
`toHex` converts the given positive integer to a string of the hexadecimal
representation of that integer. For example:

```
toHex 0 => "0"

toHex 16 => "10"

toHex 250 => "FA"
```

`toBase base i` converts the positive integer `i` to a list of it
digits in the given `base`. For example:

```
toBase 10 123 => [ 1 2 3 ]

toBase 2 6 => [ 1 1 0 ]

toBase 16 250 => [ 15 10 ]
```
2020-07-20 13:09:26 +02:00
..
2020-06-18 10:16:57 +02:00
2017-09-16 21:36:43 -04:00
2020-03-26 09:28:13 +01:00
2020-05-08 08:31:27 -04:00
2020-06-04 13:43:10 +02:00
2019-09-26 17:42:42 +02:00