From b8c283a695c8074a57d8c3dfa00934312638931d Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:02:53 -0700 Subject: Dropping unecessary php: directive to function definitions in user guide --- user_guide_src/source/helpers/number_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/helpers/number_helper.rst') diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst index 8e0ebda5e..4e12f9a27 100644 --- a/user_guide_src/source/helpers/number_helper.rst +++ b/user_guide_src/source/helpers/number_helper.rst @@ -19,7 +19,7 @@ The following functions are available: byte_format() ============= -.. php:function:: byte_format($num, $precision = 1) +.. function:: byte_format($num, $precision = 1) :param mixed $num: Number of bytes :param int $precision: Floating point precision @@ -27,7 +27,7 @@ byte_format() 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 -- cgit v1.2.3-24-g4f1b From c8b742c22a54639cc30428a50dbafeee3d809329 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 19 Jul 2013 16:47:54 -0700 Subject: Update Number helper docs --- user_guide_src/source/helpers/number_helper.rst | 42 ++++++++++++++----------- 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'user_guide_src/source/helpers/number_helper.rst') diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst index 4e12f9a27..5a3d72b00 100644 --- a/user_guide_src/source/helpers/number_helper.rst +++ b/user_guide_src/source/helpers/number_helper.rst @@ -5,7 +5,12 @@ Number Helper The Number Helper file contains functions that help you work with numeric data. -.. contents:: Page Contents +.. contents:: + :local: + +.. raw:: html + +
Loading this Helper =================== @@ -14,32 +19,33 @@ This helper is loaded using the following code:: $this->load->helper('number'); +Available Functions +=================== + The following functions are available: -byte_format() -============= -.. function:: byte_format($num, $precision = 1) +.. function:: byte_format($num[, $precision = 1]) :param mixed $num: Number of bytes :param int $precision: Floating point precision :returns: string -Formats numbers as bytes, based on size, and adds the appropriate -suffix. Examples:: + 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 + 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:: + An optional second parameter allows you to set the precision of the + result:: - echo byte_format(45678, 2); // Returns 44.61 KB + echo byte_format(45678, 2); // Returns 44.61 KB -.. note:: The text generated by this function is found in the following - language file: `language//number_lang.php` \ No newline at end of file + .. note:: The text generated by this function is found in the following + language file: `language//number_lang.php` \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 3de130c2da3b93a3404f264e92d7b65354de3548 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Feb 2014 23:31:49 +0200 Subject: [ci skip] Add return types to helper docs (+ some other formatting) --- user_guide_src/source/helpers/number_helper.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/helpers/number_helper.rst') diff --git a/user_guide_src/source/helpers/number_helper.rst b/user_guide_src/source/helpers/number_helper.rst index 5a3d72b00..2de4457d9 100644 --- a/user_guide_src/source/helpers/number_helper.rst +++ b/user_guide_src/source/helpers/number_helper.rst @@ -29,7 +29,8 @@ The following functions are available: :param mixed $num: Number of bytes :param int $precision: Floating point precision - :returns: string + :returns: Formatted data size string + :rtype: string Formats numbers as bytes, based on size, and adds the appropriate suffix. Examples:: @@ -48,4 +49,4 @@ The following functions are available: echo byte_format(45678, 2); // Returns 44.61 KB .. note:: The text generated by this function is found in the following - language file: `language//number_lang.php` \ No newline at end of file + language file: *language//number_lang.php* \ No newline at end of file -- cgit v1.2.3-24-g4f1b