From 37f4b9caa02783e06dd7c5318200113409a0deb1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 1 Jul 2011 17:56:50 -0500 Subject: backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance --- system/helpers/string_helper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/helpers/string_helper.php') diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 9f730bd10..7765bba31 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -1,4 +1,4 @@ - Date: Sun, 14 Aug 2011 12:23:55 -0600 Subject: Added increment_string() docs and changelog. --- system/helpers/string_helper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system/helpers/string_helper.php') diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 2f928a7d1..9fa69f46c 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -246,9 +246,11 @@ if ( ! function_exists('random_string')) * Add's _1 to a string or increment the ending number to allow _2, _3, etc * * @param string $str required + * @param string $separator What should the duplicate number be appended with + * @param string $first Which number should be used for the first dupe increment * @return string */ -function increment_string($str, $first = 1, $separator = '_') +function increment_string($str, $separator = '_', $first = 1) { preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match); -- cgit v1.2.3-24-g4f1b