From 2d4f5aa4d943e27ffeae524469f9c6eb18ce64d8 Mon Sep 17 00:00:00 2001 From: fhats Date: Thu, 27 Aug 2015 10:40:20 +0100 Subject: Adds a convert_base function, which can convert numbers between bases Squashed, improved docs, updated error handling and unit tests by David S. --- README.markdown | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'README.markdown') 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. -- cgit v1.2.3