From 33f6c68026a3a6f5d77f6062a3ec0c2d9c04683b Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 19 Jun 2008 18:08:04 +0000 Subject: added terabytes to number helper added number helper guide pages, menus, toc, etc --- user_guide/helpers/inflector_helper.html | 2 +- user_guide/helpers/number_helper.html | 102 +++++++++++++++++++++++++++++++ user_guide/helpers/path_helper.html | 2 +- 3 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 user_guide/helpers/number_helper.html (limited to 'user_guide/helpers') diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html index 328b41d38..4d6196e33 100644 --- a/user_guide/helpers/inflector_helper.html +++ b/user_guide/helpers/inflector_helper.html @@ -142,7 +142,7 @@ Previous Topic:   HTML Helper    ·   Top of Page   ·   User Guide Home   ·   -Next Topic:  Security Helper +Next Topic:  Number Helper

CodeIgniter  ·  Copyright © 2006-2008  ·  Ellislab, Inc.

diff --git a/user_guide/helpers/number_helper.html b/user_guide/helpers/number_helper.html new file mode 100644 index 000000000..e4dab8494 --- /dev/null +++ b/user_guide/helpers/number_helper.html @@ -0,0 +1,102 @@ + + + + + +Number Helper : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

CodeIgniter User Guide Version 1.6.2

+
+ + + + + + + + + +
+ + +
+ + + +
+ + +

Number Helper

+ +

The Number Helper file contains functions that help you work with numeric data.

+ + +

Loading this Helper

+ +

This helper is loaded using the following code:

+$this->load->helper('number'); + +

The following functions are available:

+ + +

byte_format()

+ +

Formats a numbers as bytes, based on size, and adds the appropriate suffix. Examples:

+ + +echo byte_format(456); // Returns 456.0 Bytes
+echo byte_format(4567); // Returns 4.5 KB
+echo byte_format(45678); // Returns 44.8 KB
+echo byte_format(456789); // Returns 447.8 KB
+echo byte_format(3456789); // Returns 3.3 MB
+echo byte_format(12345678912345); // Returns 1.8 GB
+echo byte_format(123456789123456789); // Returns 11,228.3 TB +
+ +
+ + + + + + + \ No newline at end of file diff --git a/user_guide/helpers/path_helper.html b/user_guide/helpers/path_helper.html index c2aa34799..19979593d 100644 --- a/user_guide/helpers/path_helper.html +++ b/user_guide/helpers/path_helper.html @@ -89,7 +89,7 @@ echo set_realpath($non_existent_directory, FALSE);