Skip to content

Commit

Permalink
Document tobase/1 and frombase/1
Browse files Browse the repository at this point in the history
  • Loading branch information
2x-1 authored Jan 15, 2021
1 parent ddb1649 commit 0d872a8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/content/manual/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2406,7 +2406,21 @@ sections:
- program: 'gsub("(?<x>.)[^a]*"; "+\(.x)-")'
input: '"Abcabc"'
output: '"+A-+a-"'

- title: "`tobase(base)`, `frombase(base)`"
body: |
`tobase(base)` inputs an integer, and then converts the integer
to the specified base. The digits are returned in reverse.
`frombase(base)` inputs an array, and then converts the array
from the specified base. The digits are expected to be in reverse.
example:
- program: 'tobase(2)'
input: '14'
output: [0, 1, 1, 1]
- program: '[0, 1, 1, 1] | frombase(2)'
input: ''
output: '14'

- title: Advanced features
body: |
Expand Down

0 comments on commit 0d872a8

Please sign in to comment.