Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samcv/perl6-number-base
https://github.com/samcv/perl6-number-base
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/samcv/perl6-number-base
- Owner: samcv
- Created: 2017-02-10T01:53:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-10T17:32:14.000Z (almost 8 years ago)
- Last Synced: 2024-11-14T10:43:20.757Z (2 months ago)
- Language: Perl6
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
NAME Number::Base
=================DESCRIPTION All of the number number bases nobody wants in Rakudo Core! Supports bases -10 to 1 in addition to allowing you to use bases 2-36 which are in core.
================================================================================================================================================================### sub to-base
```
sub to-base(
Int:D $Int,
Int:D $base
) returns Mu
```Converts an Int to the requested base. Currently supports base -10 to base 36
### sub from-base
```
sub from-base(
Str:D $Str,
Int:D $radix
) returns Mu
```Converts a Str from the requested base to an Int. Currently supports base -10 to base 36