summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/helpers/string_helper.php4
1 files changed, 3 insertions, 1 deletions
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);