summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-08-14 20:23:55 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-08-14 20:23:55 +0200
commitdbac73b4011a85c4ac3b3a7a6a8e30533b881155 (patch)
treefc7a72c29a933d77ea1358427cac3797e2ba029c /system
parentd8ef630f2d4d32eee998969e548d36dc629340d4 (diff)
Added increment_string() docs and changelog.
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);