diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2015-08-27 10:50:29 +0100 |
---|---|---|
committer | TP Honey <tphoney@users.noreply.github.com> | 2015-08-27 10:50:29 +0100 |
commit | b10978703a5e4f07f240c509a3cf881210fbd5c5 (patch) | |
tree | fca31ecf05fee935edd06ea1b2e8ed8aaa24fa84 /README.markdown | |
parent | 1bed010dbbd4590b3299c81b0e962e76b8ffa845 (diff) | |
parent | 2d4f5aa4d943e27ffeae524469f9c6eb18ce64d8 (diff) | |
download | puppet-stdlib-b10978703a5e4f07f240c509a3cf881210fbd5c5.tar.gz puppet-stdlib-b10978703a5e4f07f240c509a3cf881210fbd5c5.tar.bz2 |
Merge pull request #514 from DavidS/add-convert_base
Adds a convert_base function, which can convert numbers between bases
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index 591c27b..ccbceab 100644 --- a/README.markdown +++ b/README.markdown @@ -155,6 +155,12 @@ Appends the contents of multiple arrays onto the first array given. For example: * `concat(['1','2','3'],'4',['5','6','7'])` returns ['1','2','3','4','5','6','7']. *Type*: rvalue. +#### `convert_base` + +Converts a given integer or base 10 string representing an integer to a specified base, as a string. For example: + * `convert_base(5, 2)` results in: '101' + * `convert_base('254', '16')` results in: 'fe' + #### `count` If called with only an array, it counts the number of elements that are **not** nil/undef. If called with a second argument, counts the number of elements in an array that matches the second argument. *Type*: rvalue. |