From 25e77bfa73ef30f02f81b5500e993e9fc3887e03 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 13:33:24 +0300 Subject: [ci skip] Add a note about string helpers --- user_guide_src/source/helpers/string_helper.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'user_guide_src/source/helpers/string_helper.rst') diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index a1acb215c..53052557e 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -5,6 +5,9 @@ String Helper The String Helper file contains functions that assist in working with strings. +.. important:: Please note that these functions are NOT intended, nor + suitable to be used for any kind of security-related logic. + .. contents:: :local: -- cgit v1.2.3-24-g4f1b From 41091ba2fd3005d4a387ee17bfd7520475028627 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Dec 2016 15:25:25 +0200 Subject: Remove previously deprecates String Helper functions trim_slashes(), repeater() --- user_guide_src/source/helpers/string_helper.rst | 37 +------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'user_guide_src/source/helpers/string_helper.rst') diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index 53052557e..d697d824b 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -27,7 +27,6 @@ Available Functions The following functions are available: - .. php:function:: random_string([$type = 'alnum'[, $len = 8]]) :param string $type: Randomization type @@ -102,24 +101,6 @@ The following functions are available: .. note:: To use multiple separate calls to this function simply call the function with no arguments to re-initialize. -.. php:function:: repeater($data[, $num = 1]) - - :param string $data: Input - :param int $num: Number of times to repeat - :returns: Repeated string - :rtype: string - - Generates repeating copies of the data you submit. Example:: - - $string = "\n"; - echo repeater($string, 30); - - The above would generate 30 newlines. - - .. note:: This function is DEPRECATED. Use the native ``str_repeat()`` - instead. - - .. php:function:: reduce_double_slashes($str) :param string $str: Input string @@ -134,7 +115,6 @@ The following functions are available: $string = "http://example.com//index.php"; echo reduce_double_slashes($string); // results in "http://example.com/index.php" - .. php:function:: strip_slashes($data) :param mixed $data: Input string or an array of strings @@ -163,21 +143,6 @@ The following functions are available: and handle string inputs. This however makes it just an alias for ``stripslashes()``. -.. php:function:: trim_slashes($str) - - :param string $str: Input string - :returns: Slash-trimmed string - :rtype: string - - Removes any leading/trailing slashes from a string. Example:: - - $string = "/this/that/theother/"; - echo trim_slashes($string); // results in this/that/theother - - .. note:: This function is DEPRECATED. Use the native ``trim()`` instead: - | - | trim($str, '/'); - .. php:function:: reduce_multiples($str[, $character = ''[, $trim = FALSE]]) :param string $str: Text to search in @@ -220,4 +185,4 @@ The following functions are available: Removes single and double quotes from a string. Example:: $string = "Joe's \"dinner\""; - $string = strip_quotes($string); //results in "Joes dinner" \ No newline at end of file + $string = strip_quotes($string); //results in "Joes dinner" -- cgit v1.2.3-24-g4f1b From 24fedeb2075194f0da475f45f400a0866d9577f9 Mon Sep 17 00:00:00 2001 From: klemens Date: Mon, 16 Jan 2017 21:01:58 +0100 Subject: spelling fixes --- user_guide_src/source/helpers/string_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/helpers/string_helper.rst') diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index d697d824b..7a45dc95b 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -151,7 +151,7 @@ The following functions are available: :returns: Reduced string :rtype: string - Reduces multiple instances of a particular character occuring directly + Reduces multiple instances of a particular character occurring directly after each other. Example:: $string = "Fred, Bill,, Joe, Jimmy"; -- cgit v1.2.3-24-g4f1b