summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorMark McKinstry <mmckinst@umich.edu>2015-10-15 22:22:10 -0400
committerMark McKinstry <mmckinst@umich.edu>2015-10-15 22:22:10 -0400
commit6de1a6e0622f69ec22c64e72fd53ec12ae8c9111 (patch)
tree7b1580633e6f65ffd693dbc273c9dfc97226ada9 /README.markdown
parent5b3c623394e405ca0db5e707554a91b4252bbbad (diff)
add functionality to bool2str to return strings of your choice for a boolean
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index b6f586e..0933215 100644
--- a/README.markdown
+++ b/README.markdown
@@ -170,6 +170,22 @@ Converts a boolean to a number. Converts values:
* 'true', 't', '1', 'y', and 'yes' to 1.
Requires a single boolean or string as an input. *Type*: rvalue.
+#### `bool2str`
+
+Converts a boolean to a string using optionally supplied arguments. The optional
+second and third arguments represent what true and false will be converted to
+respectively. If only one argument is given, it will be converted from a boolean
+to a string containing 'true' or 'false'.
+
+*Examples:*
+~~~
+bool2str(true) => 'true'
+bool2str(true, 'yes', 'no') => 'yes'
+bool2str(false, 't', 'f') => 'f'
+~~~
+
+Requires a single boolean as input. *Type*: rvalue.
+
#### `capitalize`
Capitalizes the first letter of a string or array of strings. Requires either a single string or an array as an input. *Type*: rvalue.