diff options
author | Andrey Andreev <narf@devilix.net> | 2018-03-22 15:48:55 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2018-03-22 15:48:55 +0100 |
commit | 71e647782764184e3aab4faffe6d99176758979f (patch) | |
tree | 74dbdd50a61cd5674915c144aca9ebbc00b235b8 /user_guide_src/source/helpers/number_helper.rst | |
parent | b12fbad77bd69ca0c7624a9094c29b7691ea6107 (diff) |
[ci skip] 3.1.8 release
Diffstat (limited to 'user_guide_src/source/helpers/number_helper.rst')
-rw-r--r-- | user_guide_src/source/helpers/number_helper.rst | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst deleted file mode 100644 index 9d5e98cfb..000000000 --- a/user_guide_src/source/helpers/number_helper.rst +++ /dev/null @@ -1,52 +0,0 @@ -############# -Number Helper -############# - -The Number Helper file contains functions that help you work with -numeric data. - -.. contents:: - :local: - -.. raw:: html - - <div class="custom-index container"></div> - -Loading this Helper -=================== - -This helper is loaded using the following code:: - - $this->load->helper('number'); - -Available Functions -=================== - -The following functions are available: - - -.. php:function:: byte_format($num[, $precision = 1]) - - :param mixed $num: Number of bytes - :param int $precision: Floating point precision - :returns: Formatted data size string - :rtype: string - - Formats numbers as bytes, based on size, and adds the appropriate - suffix. Examples:: - - echo byte_format(456); // Returns 456 Bytes - echo byte_format(4567); // Returns 4.5 KB - echo byte_format(45678); // Returns 44.6 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 - - An optional second parameter allows you to set the precision of the - result:: - - echo byte_format(45678, 2); // Returns 44.61 KB - - .. note:: The text generated by this function is found in the following - language file: *language/<your_lang>/number_lang.php*
\ No newline at end of file |